[R] Inserting percentile values in a data frame
ramine.mossadegh at finra.org
Thu Jan 3 18:09:49 CET 2013
I need to calculate and insert the values for the 50,75,90,95 & 99
percentiles in a data frame for each row.
I used agr1$quantile <- quantile(agr1$cnt, probs=c(.50, .75, .90, .95, .99))
but that didn't work.
How can calculate the percentile for my variable "cnt" , insert & name the
percentile as p50, p75, etc
in my data frame agr1?
Thanks in advance for your thoughts/suggestions.
View this message in context: http://r.789695.n4.nabble.com/Inserting-percentile-values-in-a-data-frame-tp4654539.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help