Problem: I am unable to use a value computed in R as a dimension in a plot.
Background: I am trying to create a histogram of the residuals from a simple linear regression, similar to this plot:
R.ScriptEval('lm(q$medv ~ q$lstat)$residuals', medv, lstat)
Note that both the inputs and the output from R are numeric variables. I used the same script as a Measure expression in a scatterplot and it worked as expected. However, when I attempt to use the script to create a dimension in a histogram or a bar chart, I receive an 'Internal engine error'.
Question: Is there something about the way dimensions are used that would prevent me from using a numeric vector returned from R?