On Apr 15, 2008, at 9:53 PM, Ng Stanley wrote:

> Hi,
>
>> t <- list("cat"=1)
>> exists("t")
> [1] TRUE
>> exists("t[["cat"]]")
> Error: unexpected symbol in "exists("t[["cat"
>> exists("t[[\"cat\"]]")
> [1] FALSE

Perhaps what you want is:

"cat" %in% names(t)

> Thanks
> Stanley

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College

______________________________________________
R-help@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.

Reply via email to