[R] Partial aggregate on sorted data
ymoisan at groupesm.com
Wed Oct 24 15:30:10 CEST 2007
I'm looking for ways to compute aggregate statistics (with the aggregate
function) but with an option for sorting and selecting a subset of the data
frame. For example, I have would like to turn this :
into something like
myDataframe$SomeFactor),mean, sort=DESCENDING, subset=0.33)
where sort would sort TargetValue per factor level and subset would be (for
example) a value between 0 and 1. The example above would give me the mean
for the top third of TargetValue per factor.
Any way of doing this without having to use temporary variables to stuff my
vectors, use length(), etc ?
View this message in context: http://www.nabble.com/Partial-aggregate-on-sorted-data-tf4683988.html#a13384556
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help