# \donttest{
pnds.svy <- get_pnds(year=2023, section="Female", vars=c("J007","J009"),
labels=TRUE, deflator=TRUE, design=TRUE,
reload=TRUE, curlopts=list(), savedir=tempdir())
# Calculating proportion of people diagnosed with chronic diseases
if (!is.null(pnds.svy)) survey::svymean(x=~J007, design=pnds.svy, na.rm=TRUE)
pnds.svy2 <- get_pnds(year=2023, section="Male", vars=c("N001","N00101"),
labels=TRUE, deflator=TRUE, design=TRUE,
reload=TRUE, curlopts=list(), savedir=tempdir())
# Calculating proportion of people's self-rated health
if (!is.null(pnds.svy2)) survey::svymean(x=~N001, design=pnds.svy2, na.rm=TRUE)# }
Run the code above in your browser using DataLab