Re: [R] quantile / centile

2008-09-27 Thread Peter Dalgaard
Donald Braman wrote: Thanks, for the response! Unfortunately, I was unclear; my problem is not that I need to know what the percentile ranges are, but that I need to assign an appropriate percentile range to each of the records in my dataframe. My dataframe contains somewhere between 1000 and 9

Re: [R] quantile / centile

2008-09-27 Thread Donald Braman
Thanks, for the response! Unfortunately, I was unclear; my problem is not that I need to know what the percentile ranges are, but that I need to assign an appropriate percentile range to each of the records in my dataframe. My dataframe contains somewhere between 1000 and 9000 rows/records in my

Re: [R] quantile / centile

2008-09-27 Thread Henrique Dallazuanna
Try this: my.df$my.newvar <- quantile(my.df$my.var, probs = seq(0.01,1, 0.01)) On Sat, Sep 27, 2008 at 3:50 AM, Donald Braman <[EMAIL PROTECTED]> wrote: > I'm wondering if there is a simple way to assign a quantile to a vector in a > data frame, much like one could in Stata using centile. Let's

[R] quantile / centile

2008-09-26 Thread Donald Braman
I'm wondering if there is a simple way to assign a quantile to a vector in a data frame, much like one could in Stata using centile. Let's say I want 100 slices in my assignation. I can easily see what the limits of each slice by using quantile: quantile(my.df$my.var, probs=seq(0, 1, 0.01)) But ho