Skip to content
Prev 360833 / 398506 Next

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

Thanks David - my earlier response to Bert contains the resolution.
partialPlot was commented out deliberately as it was the target function
who's behaviour I was replicating in testFunc. The original behaviour, ie.
printing 'X1' was correct, and the do.call fix yields this same response
when testFunc is called within lapply. As I'm replicating partialPlot, no
changes can be made to testFunc (eg. your removal of 'substitute')
otherwise I'd need to patch the randomForest::partialPlot package &
function. The correct patch would be to change the eval to use the parent
environment, the subtitue should remain.

See the resolution here (jcheng beat r-help to it this time!)
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/shiny-discuss/cIZJzQmw8tQ
On 11 May 2016 at 08:48, David Winsemius <dwinsemius at comcast.net> wrote: