[Rd] value returned by by()

Seb spluque at gmail.com
Wed Sep 15 15:28:44 CEST 2010

On Wed, 15 Sep 2010 15:15:27 +0200,
Uwe Ligges <ligges at statistik.tu-dortmund.de> wrote:

> Why? It is still accessible as a list, even with S4 object, at least
> for the cases I tried.

R> wL <- with(warpbreaks, by(warpbreaks[, 1:2], tension, summary))
R> setClass("Whatever",
+          representation=representation(A="list"))
[1] "Whatever"
R> new("Whatever", A=wL)
Error in validObject(.Object) : 
  invalid class "Whatever" object: invalid object for slot "A" in class "Whatever": got class "by", should be or extend class "list"


More information about the R-devel mailing list