Re: [R] Trouble variable scoping a function writing with get()

2011-01-26 Thread Bert Gunter
It's looking for an object named "b" in the frame of the function. There is none. You need to specify get(response, pos = parent.frame()) ## or maybe even get(response, pos= globalenv()) HOWEVER, this is **exactly** why you shouldn't do this! Instead of passing in the name of the object, pass i

[R] Trouble variable scoping a function writing with get()

2011-01-26 Thread Pat Schmitz
I am having trouble with variable scoping inside/outside functions. I want to use get() to grab a named and quoted variable as an input to a function, however the function can't find the variable when it is entered into the function call, only when it is named in the main environment. I obviously