Re: [R] problem with svyby and NAs (survey package)

2012-04-13 Thread A.F.Fenton
> I'm trying to get the proportion "true" for dichotomous variable for various > subgroups in a survey. Sorry, I'm new to the list, and just saw the advice about minimally reproducible code. Here goes: library(survey) foo <- data.frame(id = 1:25, weight = runif(25),

[R] problem with svyby and NAs (survey package)

2012-04-13 Thread A.F.Fenton
Hello I'm trying to get the proportion "true" for dichotomous variable for various subgroups in a survey. This works fine, but obviously doesn't give proportions directly: svytable(~SurvYear+problem.vandal, seh.dsn, round=TRUE) problem.vandal SurvYear FALSE TRUE 1995 8906 786