Description Usage Arguments Details Value Examples
Applies levels and question text attributes to variables in a subsetted
svy_df
object using the levels from the columns with matching names in
the original data frame.
1 | copy_lev(x, y)
|
x |
the new data frame that is a subset of another data frame object. |
y |
the original data frame containing the variable levels. |
When subsetting a data frame or similar R
object, variable levels (for
factors and non-factors) and other data attributes are not copied using any
common function. Rather than applying the levels for each variable by hand,
this function completes the process in one call by matching the names of
variables in the subset data fram with those in the original, and then
copying the matched variable levels in the original object to the new one.
A data frame where all matched column names have variable levels.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.