Description Usage Arguments Details Value See Also Examples
View source: R/metadata_create.R
Create a metadata table from the survey data files.
1 2 3 | metadata_create(survey)
metadata_waves_create(survey_list)
|
survey |
A survey data frame. |
survey_list |
A list containing surveys of class survey. |
A data frame like tibble ojbect is returned.
In case you are working with a list of surveys (waves), call
metadata_waves_create
, which is a wrapper around
a list of metadata_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()
Other metadata functions:
create_codebook()
1 2 3 4 5 6 7 8 9 10 11 12 13 | metadata_create (
survey = read_rds (
system.file("examples", "ZA7576.rds",
package = "retroharmonize")
)
)
examples_dir <- system.file( "examples", package = "retroharmonize")
my_rds_files <- dir( examples_dir)[grepl(".rds",
dir(examples_dir))]
example_surveys <- read_surveys(file.path(examples_dir, my_rds_files))
metadata_waves_create (example_surveys)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.