On Tue, Apr 03, 2012 at 09:31:29AM -0400, Val wrote: > Thank you all (David, Michael, Giovanni) for your prompt response. > > First there was a typo error for the group mean it was 89.6 not 87. > > For a small data set and few groupings I can use prob=c(0, .333, .66 ,1) > to group in to three groups in this case. However, if I want to extend the > number of groupings say 10 or 15 then do I have to figure it out the > split(x, cut(x, quantile(x, prob=c(0, .333, .66 ,1)) > > Is there a short cut for that?
Hi. There may be better ways for the whole task, but specifically c(0, .333, .66 ,1) can be obtained as seq(0, 1, length=3+1) Hope this helps. Petr Savicky. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.