Displaying 1 result from an estimated 1 matches for "tp4636814p4636816".
2012 Jul 17
1
weighted mean by week
Hello!
I wrote a code that works, but it looks ugly to me - it's full of loops.
I am sure there is a much more elegant and shorter way to do it.
Thanks a lot for any hints!
Dimitri
# I have a data frame:
x<-data.frame(group=c("group1","group2","group1","group2"),
myweight=c(0.4,0.6,0.4,0.6),