Create a metadata file from your surveys.

gesis_metadata_create(survey_list)

Arguments

survey_list

A list of data frames containing surveys, or a single survey in a single data frame. The filename should be added in the column filename.

Value

A data frame with the original variable attributes and suggested conversions and changes.

Details

The structure of the returned tibble:

filename

The original file name.

id

The ID of the survey, if present.

qb

Question Block

var_name_orig

The original variable name in SPSS.

var_label_norm

The normalized variable label.

var_name_suggested

Suggested variable name.

class_orig

The original variable class after importing withread_spss.

label_orig

The original variable label in SPSS.

labels

A list of the value labels.

valid_labels

A list of the value labels that are not marked as missing values.

na_labels

A list of the value labels that refer to user-defined missing values.

na_range

An optional range of a continous missing range, if present in the vector.

n_labels

Number of categories or unique levels, which may be different from the sum of missing and category labels.

n_valid_labels

Number of categories in the non-missing range.

n_na_labels

Number of categories of the variable, should be the sum of the former two.

na_levels

A list of the user-defined missing values.

Examples

file1 <- system.file( "examples", "ZA7576.rds", package = "eurobarometer") file2 <- system.file( "examples", "ZA5913.rds", package = "eurobarometer") import_file_names <- c(file1,file2) my_surveys <- read_surveys ( import_file_names, .f = 'read_rds' )
#> Error in FUN(X[[i]], ...): The file does not exist.
gesis_metadata_create(survey_list = my_surveys )
#> Error in "list" %in% class(survey_list): object 'my_surveys' not found