[R] is.variable ? is.initialized ?

Rolf Turner r.turner at auckland.ac.nz
Fri May 15 01:26:30 CEST 2009


On 15/05/2009, at 11:19 AM, myshare wrote:

> hi guys,
>
> How do you check if variable is initialized/created, tried :
>
> is.nan(xxx)
> is.null(xxx)
> is.na(xxx)
> exists(xxx)
>
> all of them return :
>
> Error: object "xxx" not found
>
> I need true/false result ?

exists("xxx") # Note the quote marks; requires the variable name as a  
string.

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}




More information about the R-help mailing list