[R] Suggestion for ?split

From: Simon Blomberg <blomsp_at_ozemail.com.au>
Date: Thu 22 Jun 2006 - 10:07:58 EST

Hi all,

I noticed an undocumented feature for split. It sorts the resulting list according to the grouping factor. An example:

test <- data.frame(x=rnorm(48), f=letters[sample(1:8)]) split(test, test$f)

I wasn't expecting this behaviour, although I was pleasantly surprised. I suggest that the help page for split be amended to include this feature. I know it's a small thing, but someone else may also find it useful to know.



Simon Blomberg, B.Sc.(Hons.), Ph.D, M.App.Stat.
Centre for Resource and Environmental Studies
The Australian National University
Canberra ACT 0200
T: +61 2 6125 7800 email: Simon.Blomberg_at_anu.edu.au
F: +61 2 6125 0757
CRICOS Provider # 00120C

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Jun 22 10:12:11 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 22 Jun 2006 - 18:11:20 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.