[Rd] How to put my S4 class into data.frame

hadley wickham h.wickham at gmail.com
Sat Nov 4 14:39:34 CET 2006


> OTOH, it's interesting that some methods to "stick some S4
> objects into a data frame do work fine , at least for the
> following case (R-script below) -- and I wonder if we (R developers)
> shouldn't think about more explicitly supporting this,
> e.g., by stating something like
>
>  >>  If an S4 object simply *contains* an atomic class that can be
>  >>  used as data.frame column, then that S4 object can also be used
>  >>  as data.frame column
>
> and trying to fix all cases where the above is not fulfilled.

There are also many cases where using a list as a data.frame column
will cause errors, depending on the contents of the list.

Hadley



More information about the R-devel mailing list