Re: [R] Subsetting data with svyglm

2015-02-11 Thread Anthony Damico
hi brennan, survey design objects can be subsetted with the same subset() syntax as data.frame objects, so following jeff's advice maybe you want svyglm( formula , design = subset( surveydesign , variable %in% c( 'value a' , 'value b' ) ) ) for some examples of how to construct a survey design wi

Re: [R] Subsetting data with svyglm

2015-02-11 Thread Jeff Newmiller
This seems like a fundamental misunderstanding on your part of how operators, and in particular logical expressions, work in computer languages. Consider some examples: 1+2 has a numeric answer because 1 and 2 are both numeric. 1+"a" has at the very least not a numeric answer because the values

[R] Subsetting data with svyglm

2015-02-11 Thread Brennan O'Banion
I am aware that it is possible to specify a subset with a single logical operator when constructing a model, such as: svyglm(formula, design=data, subset=variable=="value"). What I can't figure out is how to specify a subset with two or more logical operators: svyglm(formula, design=data, subset=v