Re: [R] exists() and functions

2010-06-25 Thread Jonathan Greenberg
Always nice to answer my own question 3 minutes later. The missing() function does what I want. Still, why DOES this exists() statement fail? Do functions "auto create" the variables once they are called, regardless of whether or not they are assigned? --j On Fri, Jun 25, 2010 at 1:05 PM, Jona

[R] exists() and functions

2010-06-25 Thread Jonathan Greenberg
I'm a bit confused about how exists() work within a function -- I want to test for unassigned variables, but I'm doing tests in the main environment to figure out the function, so the variables DO exist in the parent environment of a function call. Why does: myfunction <- function(variable_outside