Re: [R] Existence of an object

2015-11-06 Thread Rainer Schuermann
Quotation marks help also for exists(): exists( "meanedf" ) [1] TRUE On Saturday 07 November 2015 04:48:04 Margaret Donald wrote: > I have a variable meanedf which may sometimes not be defined due to a > complex set of circumstances. > I would like to be able to find out whether or not it exists

Re: [R] Existence of an object

2015-11-06 Thread Rainer Schuermann
For me, "meanedf" %in% ls() works: meanedf <- 1 "meanedf" %in% ls() [1] TRUE rm( meanedf ) "meanedf" %in% ls() [1] FALSE Rgds, Rainer On Saturday 07 November 2015 04:48:04 Margaret Donald wrote: > I have a variable meanedf which may sometimes not be defined due to a > complex set of circumst

[R] Existence of an object

2015-11-06 Thread Margaret Donald
I have a variable meanedf which may sometimes not be defined due to a complex set of circumstances. I would like to be able to find out whether or not it exists, and then branch appropriately in my code. I had hoped to be able to use is.null() or exists() but neither of these returns TRUE or FALSE