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
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
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
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
4 matches
Mail list logo