[R] break a vector into classes
dimitris.rizopoulos at med.kuleuven.be
Mon Mar 6 15:21:23 CET 2006
probably you're looking for ?cut().
I hope it helps.
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
----- Original Message -----
From: <wouter at paramo.be>
To: <r-help at stat.math.ethz.ch>
Sent: Monday, March 06, 2006 3:06 PM
Subject: [R] break a vector into classes
> 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
> be nice...
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide!
More information about the R-help