[R] Quantiles of a subset of data
Pete Brecknock
Peter.Brecknock at bp.com
Tue Feb 19 19:51:34 CET 2013
bradleyd wrote
> That does it, thanks. Do you think you help me a little bit further?
>
> I actually have 4 columns, YEAR, DAY, TEMP , and IBI. They are all
> numeric. I need to calculate the average TEMP and IBI values between the
> 10% and 90% quantiles for each YEAR.
>
> The code
*
> by(data$day,data$year,day,c(0.1,0.9))
*
> was correct in that it calculated the quantile values as intended, but I
> don't know how to then calculate the mean TEMP and IBI values encompasses
> within those quantiles.
>
> Thanks again,
> David
have a look at trim argument of the mean function
?mean
Pete
--
View this message in context: http://r.789695.n4.nabble.com/Quantiles-of-a-subset-of-data-tp4659063p4659086.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list