break a vector into classes

wouter at wouter at
Mon Mar 6 15:06:43 CET 2006


I'm looking for a function which divides a vector into n classes and 
returns the breaks as well as the number of values in each class.

This is actually what hist(vector, breaks=n) does, but in hist() n is a 
suggestion only, and is a suggestion only and cannot be enforced (as 
far as I know...)

It is not so difficult to do it yourself, but a ready made function would 
be nice...


More information about the R-help mailing list