[Rd] split(factor, shortGroupVector) gives incorrect results in R 2.12.2
peter dalgaard
pdalgd at gmail.com
Mon Mar 21 18:13:29 CET 2011
On Mar 21, 2011, at 17:16 , William Dunlap wrote:
>> split(factor(letters[1:3]), c("Group one", "Group two"))
Yes, that's a bug (at the very least, it is against documented behavior)
The strong suspicion is that
ind <- .Internal(split(seq_along(f), f))
should have seq_along(x) , not f. But would that break for other reasons?
(It would! Surv() objects to name one case. In general, we seem to be in trouble if "[" and length() methods are not compatible.)
--
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-devel
mailing list