On Wed, Feb 2, 2011 at 7:22 PM, Nick Matzke <mat...@berkeley.edu> wrote:
> Oh wait, this basically does it:
>
>> if ("a" %in% attributes(z)$names)
> + print(TRUE)
> [1] TRUE
>
> (but there may be a better way)

If z is a list, you can test

is.null(z$a)

Peter

______________________________________________
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