Learn R Programming

srvyr (version 1.3.0)

group_trim: Single table verbs from dplyr and tidyr

Description

These are data manipulation functions designed to work on tbl_svy objects.

Arguments

Details

mutate and transmute can add or modify variables. See mutate for more details.

select, rename, and rename_with keep or rename variables. See select for more details.

pull extracts a variable as a vector (whereas select returns a tbl_svy). See pull for more details.

filter keeps certain observations. See filter for more details.

#' drop_na drops observations containing missing values. See drop_na for more details.

arrange is not implemented for tbl_svy objects. Nor are any two table verbs such as bind_rows, bind_cols or any of the joins (full_join, left_join, etc.). These data manipulations may require modifications to the survey variable specifications and so cannot be done automatically. Instead, use dplyr to perform them while the data is still stored in data.frames.