Skip to content
Prev 273772 / 398506 Next

Data frame aggregation

On Oct 7, 2011, at 14:53 , PHILIP GLADWIN, BLOOMBERG TRADEBOOK: wrote:

            
You can do it in steps:

1. calculate a new variable, say TMP <- SHARES*PERFORMANCE
2. aggregate SHARES and TMP using sum()
3. in the aggregated data compute PERFORMANCE <- TMP/SHARES

(Interesting to see that we have users inside Bloomberg, give the recent trademark complaint against the rbloomberg package...)

-pd