search for: aggregationvar

Displaying 1 result from an estimated 1 matches for "aggregationvar".

2012 Nov 01
4
Loop over several variables
Hey everybody, I am looking for a way to loop commands over several variables in a dataframe. Basically I want to do something like this: ti1<-aggregate(dataframename$y1, by=data.frame(dataframename$aggregationvar), sum,na.rm=TRUE) This works fine as it is but i want to do it for several variables thereby generating several tix. I tried with a for-loop but the problem was that I could neither find a way combine my indexnumber i (1 ... x) with the y or ti (as for example in Stata I could do by...