I'm trying to return a vector through a Tableau calculated field. According to link below, Tableau can either receive a single value or a vector using connections to R through a calculated field.
http://community.tableau.com/docs/DOC-5313
see:
"...If the R code returns a matrix of values, Tableau won’t know what to do, we have to return a single value or a vector,..."
This is what I have in my calculated field, where Parameter 1 and Parameter 2 are just arbitrary values (just for demonstration purposes):
SCRIPT_REAL ('testvector <- c(.arg1, .arg2); testvector',min([Parameter 1]), min([Parameter 2]))
I was expected a single vector to be returned, but I'm getting the following error message:
## Error: Unexpected number of results returned by SCRIPT function. Function expected 1 values; 2 values were returned.