Skip to content
Prev 360826 / 398506 Next

Ensure parameter is a string when passed within an lapply & called function runs a 'substitute' on it

It would be helpful if you could articulate the issue.
I'm assuming that the comment character is actually something that was inserted in hte process of stripping hte HTML from this posting.

It throws an error when removed:

Error in partialPlot(x = model, pred.data = dataSet, x.var = "X1", plot = F) : 
  object 'model' not found
Try changing to eval(x.bar)
Returns:
[1] "is.character(x.var) TRUE is.name(x.var) FALSE"
[1] "X1"
[1]  0.8704543 -0.4421564 -0.6725336 -1.3096399 -1.0531335 -0.4979650
Retruns:
[1] "var X1"
[1] "is.character(x.var) TRUE is.name(x.var) FALSE"
[1] "X1"
[1]  0.8704543 -0.4421564 -0.6725336 -1.3096399 -1.0531335 -0.4979650
[[1]]
[1]  0.8704543 -0.4421564 -0.6725336 -1.3096399 -1.0531335 -0.4979650
Please learn to post in plain text for this mailing list.