That works perfectly. Thank you.
Henrique Dallazuanna wrote:
>
> Try this:
>
> cut(x, breaks = breaks, labels = sprintf("bin%d", 1:10))
>
> On Tue, Nov 17, 2009 at 1:43 PM, Gunadi wrote:
>>
>> Hi All - I am trying to add a new variable to my dataframe which is a
>> series
>> of bins based
Try this:
cut(x, breaks = breaks, labels = sprintf("bin%d", 1:10))
On Tue, Nov 17, 2009 at 1:43 PM, Gunadi wrote:
>
> Hi All - I am trying to add a new variable to my dataframe which is a series
> of bins based on another variable which is distance. So, I'd like to end
> with each of my distance
Hi All - I am trying to add a new variable to my dataframe which is a series
of bins based on another variable which is distance. So, I'd like to end
with each of my distances classified into bin 1, bin 2, bin 3 etc.
Below is a start.
x<-rnorm(100, mean=100, sd=30) #Generates sample distances
b
3 matches
Mail list logo