Skip to content
Prev 317895 / 398506 Next

Quantiles of a subset of data

bradleyd wrote
Need to add the quantiles of interest .....

# Dummy Data
d <- data.frame(year=c(rep(2010,10),rep(2011,10),rep(2012,10)), quantity =
c(1:30)) 

# Quantiles by Year
by(d$quantity,d$year,quantile,c(0.1,0.9))

HTH

Pete



--
View this message in context: http://r.789695.n4.nabble.com/Quantiles-of-a-subset-of-data-tp4659063p4659072.html
Sent from the R help mailing list archive at Nabble.com.