View source: R/metadata_create.R
| metadata_survey_create | R Documentation |
Extract variable-level metadata from a survey dataset and return the result as a nested data frame.
metadata_survey_create(survey)
survey |
A survey object of class [survey()]. Survey objects are typically created with:
Survey objects can also be created manually from a data frame with [survey()]. |
The metadata table contains:
variable names and labels,
imported storage classes,
value labels,
user-defined missing values,
missing value ranges,
and summary counts of labelled categories.
For multiple surveys, use [metadata_create()], which applies 'metadata_survey_create()' across a list of surveys or survey files.
A nested data frame containing:
Original survey file name.
Survey identifier.
Original variable name.
Imported storage class.
Original variable label.
List column of value labels.
List column of non-missing value labels.
List column of user-defined missing labels.
List column containing user-defined missing ranges.
Number of labelled categories.
Number of non-missing categories.
Number of missing categories.
[metadata_create()], [create_variable_catalog()]
Other metadata functions:
create_codebook(),
is.crosswalk_table(),
metadata_create()
metadata_survey_create(
survey = read_rds(
system.file(
"examples",
"ZA7576.rds",
package = "retroharmonize"
)
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.