Message-ID: <8d4c23b10905190923v46439b8emc1f9419c7fb5c80@mail.gmail.com>
Date: 2009-05-19T16:23:31Z
From: Linlin Yan
Subject: exists function on list objects gives always a FALSE
In-Reply-To: <4471fca90905190907j19203cb9wc01ae38de8415ab0@mail.gmail.com>
SmoothData$span is not an object which can be checked by exists(), but
part of an object which can be checked by is.null().
On Wed, May 20, 2009 at 12:07 AM, ?rout?k <zroutik at gmail.com> wrote:
> Dear R-users,
>
> in a minimal example exists() gives FALSE on an object which obviously does
> exist. How can I check on that list object anyway else, please?
>
>> SmoothData <- list(exists=TRUE, span=0.001)
>> SmoothData
> $exists
> [1] TRUE
>
> $span
> [1] 0.001
>
>> exists("SmoothData")
> TRUE
>
>> exists("SmoothData$span")
> FALSE
>
>> exists("SmoothData[[2]]")
> FALSE
>
> Thank you for any opinion regarding this topic.
> Zroutik
>
> ? ? ? ?[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>