Hi R users,

I am trying to use the aggregate function with a survey design object and 
survey functions, but get the following error. I think I am incorrectly using the 
syntax somehow, and it may not be possible to access variables directly by 
name in a survey-design object. Am I right? How do I fix this problem? I have 
used aggregate with "mean" and "weighted.mean", and that works fine. I am trying 
to find out where the difference is. What would be an efficient alternative 
to aggregate for a large dataset?

> s <- aggregate(income,list(age,sex),function(x) (svymean(~x,design=d.na)))
Error in aggregate(income, list(age, sex), function(x) (svymean(~x,  : 
    Object "income" not found
 

        [[alternative HTML version deleted]]

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to