tests/brewer_cpp.R

## pps="brewer" can't use rcpp
## this checks that it doesn't
library(survey)
data(election)

dpps_br<- svydesign(id=~1,  fpc=~p, data=election_pps, pps="brewer")
options(survey.use_rcpp=TRUE)
a<-svytotal(~Bush+Kerry+Nader, dpps_br)
options(survey.use_rcpp=FALSE)
b<-svytotal(~Bush+Kerry+Nader, dpps_br)

stopifnot(identical(a,b))
bschneidr/fastsurvey documentation built on March 13, 2024, 11:12 a.m.