February 2009
M T W T F S S
« Aug   Apr »
 1
2345678
9101112131415
16171819202122
232425262728  

ave

I discovered a new, very useful, R function yesterday: ave.

This is what it does: “Subsets of ‘x[]‘ are averaged, where each subset consist of those observations with the same factor levels.”

But interestingly, you can use any function other than average. The output of that function is set against each observation.

I wanted to, for example, stick [...]