Package: srvyr 1.3.1.9000

srvyr: 'dplyr'-Like Syntax for Summary Statistics of Survey Data

Use piping, verbs like 'group_by' and 'summarize', and other 'dplyr' inspired syntactic style when calculating summary statistics on survey data using functions from the 'survey' package.

Authors:Greg Freedman Ellis [aut, cre], Thomas Lumley [ctb], Tomasz Żółtak [ctb], Ben Schneider [aut, ctb], Pavel N. Krivitsky [ctb]

srvyr_1.3.1.9000.tar.gz
srvyr_1.3.1.9000.zip(r-4.7)srvyr_1.3.1.9000.zip(r-4.6)srvyr_1.3.1.9000.zip(r-4.5)
srvyr_1.3.1.9000.tgz(r-4.6-any)srvyr_1.3.1.9000.tgz(r-4.5-any)
srvyr_1.3.1.9000.tar.gz(r-4.7-any)srvyr_1.3.1.9000.tar.gz(r-4.6-any)
srvyr_1.3.1.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
srvyr/json (API)
NEWS

# Install 'srvyr' in R:
install.packages('srvyr', repos = c('https://gergness.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/gergness/srvyr/issues

Pkgdown/docs site:https://gdfe.co

On CRAN:

Conda:

survey

14.15 score 223 stars 14 packages 2.4k scripts 12k downloads 5 mentions 111 exports 30 dependencies

Last updated from:51f55c8594. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK216
source / vignettesOK220
linux-release-x86_64OK195
macos-release-arm64OK183
macos-oldrel-arm64OK161
windows-develOK135
windows-releaseOK149
windows-oldrelOK149
wasm-releaseOK122

Exports:%>%acrossall_varsanti_joinany_varsas_srvyr_result_dfas_surveyas_survey_designas_survey_repas_survey_twophaseas_tibblec_acrosscascadecollectcomputecur_columncur_datacur_groupcur_group_idcur_svycur_svy_fullcur_svy_wtscurrent_svydrop_naenexprenquoexprexprsfilterfilter_allfilter_atfilter_iffunsget_var_estgroup_bygroup_by_group_by_allgroup_by_atgroup_by_ifgroup_datagroup_indicesgroup_keysgroup_mapgroup_map_dfrgroup_modifygroup_nestgroup_rowsgroup_sizegroup_splitgroup_trimgroup_varsgroup_walkgroupsinteractis.interactionmutatemutate_allmutate_atmutate_eachmutate_ifnn_groupsnest_bypullquoquo_namequosreframerenamerename_allrename_atrename_ifrename_withselectselect_allselect_atselect_ifsemi_joinset_survey_varssummarisesummarise_allsummarise_atsummarise_eachsummarise_ifsummarizesummarize_allsummarize_atsummarize_eachsummarize_ifsurvey_corrsurvey_countsurvey_meansurvey_mediansurvey_old_mediansurvey_old_quantilesurvey_propsurvey_quantilesurvey_ratiosurvey_sdsurvey_tallysurvey_totalsurvey_varsvychisqsymsymstbl_varstransmuteungroupuninteractunweightedvars

Dependencies:clicpp11DBIdplyrgenericsgluelatticelifecyclemagrittrMatrixminqamitoolsnumDerivpillarpkgconfigpurrrR6RcppRcppArmadillorlangstringistringrsurveysurvivaltibbletidyrtidyselectutf8vctrswithr

Databases in srvyr

Rendered fromsrvyr-database.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2024-07-15
Started: 2016-09-20

Extending srvyr

Rendered fromextending-srvyr.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2022-02-19
Started: 2017-10-15

srvyr compared to the survey package

Rendered fromsrvyr-vs-survey.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2025-08-03
Started: 2016-01-10

Readme and manuals

Help Manual

Help pageTopics
Create a tbl_svy from a data.frameas_survey as_survey.data.frame as_survey.survey.design2 as_survey.svyrep.design as_survey.tbl_lazy as_survey.tbl_svy as_survey.twophase2
Create a tbl_svy survey object using sampling designas_survey_design as_survey_design.data.frame as_survey_design.survey.design2 as_survey_design.tbl_lazy
Create a tbl_svy survey object using replicate weightsas_survey_rep as_survey_rep.data.frame as_survey_rep.survey.design2 as_survey_rep.svyrep.design as_survey_rep.tbl_lazy as_survey_rep.tbl_svy
Create a tbl_svy survey object using two phase designas_survey_twophase as_survey_twophase.data.frame as_survey_twophase.twophase2
Coerce survey variables to a data frame (tibble)as_tibble
Summarise multiple values into cascading groupscascade
Force computation of a database querycollect compute
Get the survey data for the current contextcurrent_svy cur_svy cur_svy_full
Get the full-sample weights for the current contextcur_svy_wts
Filtering joins from dplyranti_join dplyr_filter_joins semi_join
Get the variance estimates for a survey estimateget_var_est
Group a (survey) dataset by one or more variables.group_by group_by_
Apply a function to each groupgroup_map.tbl_svy group_map_dfr
Single table verbs from dplyr and tidyrdplyr_single drop_na filter group_trim mutate pull rename rename_with select transmute
Get/set the grouping variables for tbl.groups group_data group_indices group_keys group_rows group_size group_vars n_groups ungroup
Create interaction terms to group by when summarizinginteract
Set the variables for the current survey variableset_survey_vars
srvyr: A package for 'dplyr'-Like Syntax for Summary Statistics of Survey Data.srvyr-package srvyr
srvyr interaction columnsrvyr_interaction
Summarise multiple values to a single value.summarise summarize
Manipulate multiple columns.all_vars any_vars filter_all filter_at filter_if funs group_by_all group_by_at group_by_if mutate_all mutate_at mutate_each mutate_if rename_all rename_at rename_if select_all select_at select_if summarise_all summarise_at summarise_each summarise_if summarize_all summarize_at summarize_each summarize_if vars
Calculate correlation and its variation using survey methodssurvey_corr
Calculate mean/proportion and its variation using survey methodssurvey_mean survey_prop
Calculate the quantile and its variation using survey methodssurvey_old_median survey_old_quantile
Calculate the quantile and its variation using survey methodssurvey_median survey_quantile
Calculate the ratio and its variation using survey methodssurvey_ratio
Count/tally survey weighted observations by groupsurvey_count survey_tally
Calculate the total and its variation using survey methodssurvey_total
Calculate the population variance and its variation using survey methodssurvey_sd survey_var
Chisquared tests of association for survey data.svychisq
tbl_svy object.tbl_svy
List variables produced by a tbl.tbl_vars
Break interaction vectors back into component columnsis.interaction uninteract uninteract.data.frame uninteract.srvyr_interaction
Calculate the an unweighted summary statistic from a surveyunweighted