Skip to content
Prev 37736 / 63424 Next

value returned by by()

On Tue, 14 Sep 2010 12:02:04 +0200,
Uwe Ligges <ligges at statistik.tu-dortmund.de> wrote:

            
Thanks Uwe, however, that still returns an array when using the
data.frame method for by():

R> class(unclass(with(warpbreaks, by(warpbreaks[, 1:2], tension, summary))))
[1] "array"

It seems as if the only way to really ensure a list:

R> class(lapply(unclass(with(warpbreaks, by(warpbreaks[, 1:2], tension, summary))), function(x) x))
[1] "list"

but it seems like a waste to call another function just to do this.
Message-ID: <877hiob1mk.fsf@kolob.sebmags.homelinux.org>
In-Reply-To: <4C8F481C.8010502@statistik.tu-dortmund.de> (Uwe Ligges's message of "Tue, 14 Sep 2010 12:02:04 +0200")