[R] Suggestion for ?split

Simon Blomberg blomsp at ozemail.com.au
Thu Jun 22 02:07:58 CEST 2006


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.

Cheers,

Simon.

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



More information about the R-help mailing list