Displaying 1 result from an estimated 1 matches for "keyprofa".
2008 May 30
1
Aggregation and the meaning of class
Dear R-ers,
My aggregation saga continues.
Using the following sequence, I can calculate any statistic for row
groups and merge the result back to all associated rows ...
> WM = by( D60, D60[ "KeyProfA"], FUN=function(x) weighted.mean( x$IAC, x$Wt))
> D60$IAC.WM = as.numeric( WM[ D60$KeyProfA])
> class( WM)
[1] "by"
Questions ...
1) Is this a reasonable way to obtain the desired result?
2) What can one glean by knowing the class of WM ("by")? It appears
to...