From spluque at gmail.com  Wed Sep 15 15:28:44 2010
From: spluque at gmail.com (Seb)
Date: Wed, 15 Sep 2010 08:28:44 -0500
Subject: [Rd] value returned by by()
In-Reply-To: <4C90C6EF.6030200@statistik.tu-dortmund.de> (Uwe Ligges's message
	of "Wed, 15 Sep 2010 15:15:27 +0200")
References: <87vd69b8f6.fsf@kolob.sebmags.homelinux.org>
	<4C8F481C.8010502@statistik.tu-dortmund.de>
	<877hiob1mk.fsf@kolob.sebmags.homelinux.org>
	<4C9089FE.40704@statistik.tu-dortmund.de>
	<2EA29852-74F3-4107-A428-3F15C9274D09@gmail.com>
	<87fwxbrwje.fsf@kolob.sebmags.homelinux.org>
	<4C90C6EF.6030200@statistik.tu-dortmund.de>
Message-ID: <87aanj6sqb.fsf@kolob.sebmags.homelinux.org>

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"


-- 
Seb



[Rd] value returned by by()
Seb