[R] Simple question on binning data

Bert Gunter gunter.berton at gene.com
Thu May 13 23:05:16 CEST 2010


However, I'm going to go way out on a limb here, as I know absolutely
nothing of what you're up to, and suggest that you do NOT need to bin your

-- Bert

Bert Gunter
Genentech Nonclinical Biostatistics

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Erik Iverson
Sent: Thursday, May 13, 2010 1:51 PM
To: george5000
Cc: r-help at r-project.org
Subject: Re: [R] Simple question on binning data

There would be several people who could help if you gave us a minimal, 
reproducible example like the posting guide asks for.

If you have a vector of continuous data, and need to create a 
categorical variable (in R, a factor) from that continuous variable, 
then ?cut can help you.

george5000 wrote:
> Hello everyone,
> I have a data set, and I need to bin my data using a bin width of say
> Would anyone be willing to tell me how to do this in R?
> Thanks

R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list