Displaying 1 result from an estimated 1 matches for "stratvar2".
Did you mean:
stratvar_
2003 Jul 31
1
help with tapply and weighted.mean
Hello!
I have data frame with 'weights' in one of the columns. I need to
compute weighted mean on another column other factor variable and
i am trying to:
res<-tapply(data$k,list(data$model),weighted.mean,w=data$w,na.rm=T)
and i get:
Warning messages:
1: longer object length
is not a multiple of shorter object length in: x * w
2: longer object length
is not a multiple of shorter