On Wed, Feb 2, 2011 at 7:22 PM, Nick Matzke <matzke at 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