On 06/08/2012 12:43 AM, David Studer wrote:
Could anyone please tell me what is the most elegant
way to divide an ordinal variable in equal groups? (as
cut() does with continous variables)

for example I'd like to have the factor "educational level"
in three groups "low" "medium" and "high"

Hi David,
Sounds like

quantile(educational_level,probs=seq(0,1,length.out=3))

to me.

Jim

______________________________________________
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.

Reply via email to