[R] is.variable ? is.initialized ?

myshare mraptor at gmail.com
Fri May 15 01:34:29 CEST 2009


thanx, I forgot something how then do you check if u have something like this :

exists("xxx$array")

this does not seem to work !! ;\

On Thu, May 14, 2009 at 11:26 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:
>
> 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 confidential. If you are not
> theintended recipient please delete the message and notify the sender.Any
> views or opinions presented are solely those of the author.
>
> This e-mail has been scanned and cleared by
> MailMarshalwww.marshalsoftware.com
> ######################################################################
>




More information about the R-help mailing list