From hedderik@cmu.edu  Sun Jul 28 14:57:00 2002
From: hedderik@cmu.edu (hedderik@cmu.edu)
Date: Sun, 28 Jul 2002 15:57:00 +0200 (MET DST)
Subject: [R] bug in unsplit()? (PR#1844)
Message-ID: <200207281357.PAA29189@pubhealth.ku.dk>

> Thanks for pointing this out. I think your code should work, although
> I'm slightly uneasy about actually modifying f, so how about

Just curious, why are you uneasy about that? Does it have side effects?

>         len <- length(if (is.list(f)) f[[1]] else f)

The reason I used the interaction() call is that this seems to work too:

 > split(1:10,list(a=1:2,b=1:5))

So, lists with unequal lengths.

   - Hedderik.


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[R] bug in unsplit()? (PR#1844)
hedderik@cmu.edu