View source: R/metadata_create.R
metadata_survey_create | R Documentation |
Create a metadata table from the survey data files.
metadata_survey_create(survey)
survey |
A survey data frame. You receive a survey object with any importing function, i.e.
|
A data frame like tibble object is returned.
In case you are working with several surveys, a list of surveys or a vector
of file names containing the full path to the survey must be called with
metadata_create
, which is a wrapper around
a list of metadata_survey_create
calls.
The structure of the returned tibble:
The original file name; if present; missing
, if a non-survey
data frame is used as input survey
.
The ID of the survey, if present; missing
, if a non-survey
data frame is used as input survey
.
The original variable name in SPSS.
The original variable class after importing withread_spss
.
The original variable label in SPSS.
A list of the value labels.
A list of the value labels that are not marked as missing values.
A list of the value labels that refer to user-defined missing values.
An optional range of a continuous missing range, if present in the vector.
Number of categories or unique levels, which may be different from the sum of missing and category labels.
Number of categories in the non-missing range.
Number of categories of the variable, should be the sum of the former two.
A list of the user-defined missing values.
A nested data frame with metadata and the range of labels, na_values and the na_range itself.
Other metadata functions:
create_codebook()
,
crosswalk_table_create()
,
metadata_create()
metadata_create (
survey_list = 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.