问题 I am using the functions in the R survey -library, and per this example on Stackoverflow, I use bquote() and as.name() to dynamically construct the formula for specifying the variables. This works fine for svytable() , but not for svychisq() . For example: library(survey) data(api) dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) colvar <- 'sch.wide' rowvar <- 'awards' svytable(bquote(~.(as.name(rowvar)) + .(as.name(colvar)) ), dstrat) sch.wide awards No Yes No