Create a metadata table from the survey data files.
Details
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:
- filename
The original file name; if present;
missing
, if a non-survey
data frame is used as inputsurvey
.- id
The ID of the survey, if present;
missing
, if a non-survey
data frame is used as inputsurvey
.- var_name_orig
The original variable name in SPSS.
- class_orig
The original variable class after importing with
read_spss
.- var_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 continuous 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.
See also
Other metadata functions:
create_codebook()
,
crosswalk_table_create()
,
metadata_create()
Examples
metadata_create (
survey_list = read_rds (
system.file("examples", "ZA7576.rds",
package = "retroharmonize")
)
)
#> filename id var_name_orig class_orig
#> ZA7576.1 ZA7576.rds ZA7576 rowid character
#> ZA7576.2 ZA7576.rds ZA7576 doi character
#> ZA7576.3 ZA7576.rds ZA7576 version character
#> ZA7576.4 ZA7576.rds ZA7576 uniqid numeric
#> ZA7576.5 ZA7576.rds ZA7576 caseid numeric
#> ZA7576.6 ZA7576.rds ZA7576 serialid numeric
#> ZA7576.7 ZA7576.rds ZA7576 isocntry character
#> ZA7576.8 ZA7576.rds ZA7576 p1 haven_labelled
#> ZA7576.9 ZA7576.rds ZA7576 p2 haven_labelled
#> ZA7576.10 ZA7576.rds ZA7576 p3 haven_labelled_spss
#> ZA7576.11 ZA7576.rds ZA7576 p4 haven_labelled
#> ZA7576.12 ZA7576.rds ZA7576 nuts haven_labelled
#> ZA7576.13 ZA7576.rds ZA7576 d7 haven_labelled
#> ZA7576.14 ZA7576.rds ZA7576 d8 haven_labelled
#> ZA7576.15 ZA7576.rds ZA7576 d25 haven_labelled_spss
#> ZA7576.16 ZA7576.rds ZA7576 d60 haven_labelled
#> ZA7576.17 ZA7576.rds ZA7576 qa14_5 haven_labelled
#> ZA7576.18 ZA7576.rds ZA7576 qa14_3 haven_labelled_spss
#> ZA7576.19 ZA7576.rds ZA7576 qa14_2 haven_labelled_spss
#> ZA7576.20 ZA7576.rds ZA7576 qa14_4 haven_labelled_spss
#> ZA7576.21 ZA7576.rds ZA7576 qa14_1 haven_labelled_spss
#> ZA7576.22 ZA7576.rds ZA7576 qa6a_5 haven_labelled_spss
#> ZA7576.23 ZA7576.rds ZA7576 qa6a_10 haven_labelled_spss
#> ZA7576.24 ZA7576.rds ZA7576 qa6b_2 haven_labelled_spss
#> ZA7576.25 ZA7576.rds ZA7576 qa6a_3 haven_labelled_spss
#> ZA7576.26 ZA7576.rds ZA7576 qa6a_1 haven_labelled_spss
#> ZA7576.27 ZA7576.rds ZA7576 qa6b_4 haven_labelled_spss
#> ZA7576.28 ZA7576.rds ZA7576 qa6a_8 haven_labelled_spss
#> ZA7576.29 ZA7576.rds ZA7576 qa6a_9 haven_labelled_spss
#> ZA7576.30 ZA7576.rds ZA7576 qa6a_4 haven_labelled_spss
#> ZA7576.31 ZA7576.rds ZA7576 qa6a_2 haven_labelled_spss
#> ZA7576.32 ZA7576.rds ZA7576 qa6b_1 haven_labelled_spss
#> ZA7576.33 ZA7576.rds ZA7576 qa6a_6 haven_labelled_spss
#> ZA7576.34 ZA7576.rds ZA7576 qa6a_7 haven_labelled_spss
#> ZA7576.35 ZA7576.rds ZA7576 qa6a_11 haven_labelled_spss
#> ZA7576.36 ZA7576.rds ZA7576 qa6b_3 haven_labelled_spss
#> ZA7576.37 ZA7576.rds ZA7576 qd6.1 haven_labelled_spss
#> ZA7576.38 ZA7576.rds ZA7576 qd6.2 haven_labelled_spss
#> ZA7576.39 ZA7576.rds ZA7576 qd6.3 haven_labelled_spss
#> ZA7576.40 ZA7576.rds ZA7576 qd6.4 haven_labelled_spss
#> ZA7576.41 ZA7576.rds ZA7576 qd6.5 haven_labelled_spss
#> ZA7576.42 ZA7576.rds ZA7576 qd6.6 haven_labelled_spss
#> ZA7576.43 ZA7576.rds ZA7576 qd6.7 haven_labelled_spss
#> ZA7576.44 ZA7576.rds ZA7576 qd6.8 haven_labelled_spss
#> ZA7576.45 ZA7576.rds ZA7576 qd6.9 haven_labelled_spss
#> ZA7576.46 ZA7576.rds ZA7576 qd6.10 haven_labelled_spss
#> ZA7576.47 ZA7576.rds ZA7576 qd6.11 haven_labelled_spss
#> ZA7576.48 ZA7576.rds ZA7576 qd6.12 haven_labelled_spss
#> ZA7576.49 ZA7576.rds ZA7576 qd6.13 haven_labelled_spss
#> ZA7576.50 ZA7576.rds ZA7576 qd6.14 haven_labelled_spss
#> ZA7576.51 ZA7576.rds ZA7576 qg1b haven_labelled_spss
#> ZA7576.52 ZA7576.rds ZA7576 qg8 haven_labelled_spss
#> ZA7576.53 ZA7576.rds ZA7576 w1 numeric
#> ZA7576.54 ZA7576.rds ZA7576 w3 numeric
#> ZA7576.55 ZA7576.rds ZA7576 wex numeric
#> var_label_orig
#> ZA7576.1 unique_identifier_in_za_7576
#> ZA7576.2 digital_object_identifier
#> ZA7576.3 gesis_archive_version_and_date
#> ZA7576.4 unique_respondent_id_caseid_by_kantar_country_code
#> ZA7576.5 kantar_case_id_country_specific
#> ZA7576.6 serial_case_id_appointed_by_kantar
#> ZA7576.7 country_code_iso_3166
#> ZA7576.8 date_of_interview
#> ZA7576.9 time_of_interview
#> ZA7576.10 duration_of_interview
#> ZA7576.11 n_of_persons_present_during_interview
#> ZA7576.12 region_nuts_codes
#> ZA7576.13 marital_status
#> ZA7576.14 age_education
#> ZA7576.15 type_of_community
#> ZA7576.16 difficulties_paying_bills_last_year
#> ZA7576.17 council_of_the_eu_trust
#> ZA7576.18 european_central_bank_trust
#> ZA7576.19 european_commission_trust
#> ZA7576.20 european_council_trust
#> ZA7576.21 european_parliament_trust
#> ZA7576.22 trust_in_institutions_army
#> ZA7576.23 trust_in_institutions_european_union
#> ZA7576.24 trust_in_institutions_european_union_tcc
#> ZA7576.25 trust_in_institutions_justice_legal_system
#> ZA7576.26 trust_in_institutions_media
#> ZA7576.27 trust_in_institutions_media_tcc
#> ZA7576.28 trust_in_institutions_national_government
#> ZA7576.29 trust_in_institutions_national_parliament
#> ZA7576.30 trust_in_institutions_police
#> ZA7576.31 trust_in_institutions_political_parties
#> ZA7576.32 trust_in_institutions_political_parties_tcc
#> ZA7576.33 trust_in_institutions_public_administration
#> ZA7576.34 trust_in_institutions_reg_local_public_authorities
#> ZA7576.35 trust_in_institutions_united_nations
#> ZA7576.36 trust_in_institutions_united_nations_tcc
#> ZA7576.37 important_values_pers_rule_of_law
#> ZA7576.38 important_values_pers_respect_human_life
#> ZA7576.39 important_values_pers_human_rights
#> ZA7576.40 important_values_pers_individual_freedom
#> ZA7576.41 important_values_pers_democracy
#> ZA7576.42 important_values_pers_peace
#> ZA7576.43 important_values_pers_equality
#> ZA7576.44 important_values_pers_solidarity
#> ZA7576.45 important_values_pers_tolerance
#> ZA7576.46 important_values_pers_religion
#> ZA7576.47 important_values_pers_self_fulfilment
#> ZA7576.48 important_values_pers_respect_for_cultures
#> ZA7576.49 important_values_pers_none_spont
#> ZA7576.50 important_values_pers_dk
#> ZA7576.51 voters_when_decided_to_vote
#> ZA7576.52 non_voters_when_decided_not_to_vote
#> ZA7576.53 weight_result_from_target_redressment
#> ZA7576.54 weight_germany
#> ZA7576.55 weight_extrapolated_population_aged_15_plus
#> labels
#> ZA7576.1 NA
#> ZA7576.2 NA
#> ZA7576.3 NA
#> ZA7576.4 NA
#> ZA7576.5 NA
#> ZA7576.6 NA
#> ZA7576.7 NA
#> ZA7576.8 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21
#> ZA7576.9 1, 2, 3, 4, 5, 6, 8
#> ZA7576.10 1, 363, 377, 383, 388, 392, 409, 414, 416, 452, 454, 482, 531, 537, 543, 548, 555, 604, 613, 627, 656, 709, 738, 744, 747, 999
#> ZA7576.11 1, 2, 3, 4, 5
#> ZA7576.12 ME, RS, MT, LU, CY, DE1, DE2, DE3, DE4, DE5, DE6, DE7, DE8, DE9, FR9, DEA, DEB, DEC, UKC, ITC, DED, UKD, DEE, UKE, DEF, UKF, ITF, DEG, UKG, ITG, UKH, ITH, UKI, ITI, UKJ, UKK, UKL, UKM, UKN, BE10, FR10, TR10, HU10, PT20, EL30, FR30, ES30, PT30, ES70, TR90, DK01, SK01, CZ01, SE11, EL11, NL11, PL11, RO11, ES11, AT11, PT11, BE21, SE21, EL21, NL21, PL21, RO21, FR21, TR21, ES21, AT21, HU21, BE31, SE31, BG31, NL31, PL31, RO31, TR31, AT31, HU31, BG41, EL41, NL41, PL41, RO41, FR41, TR41, ES41, PL51, FR51, TR51, ES51, PL61, FR61, TR61, ES61, FR71, TR71, FR81, TR81, TRA1, TRB1, TRC1, DK02, SK02, CZ02, SE12, EL12, NL12, PL12, RO12, ES12, AT12, BE22, SE22, EL22, NL22, PL22, RO22, FR22, TR22, ES22, AT22, HU22, BE32, SE32, BG32, NL32, PL32, RO32, TR32, AT32, HU32, BG42, EL42, NL42, PL42, RO42, FR42, TR42, ES42, PL52, FR52, TR52, ES52, PL62, FR62, TR62, ES62, FR72, TR72, FR82, TR82, TRA2, TRB2, TRC2, DK03, SK03, CZ03, EL13, NL13, ES13, AT13, BE23, SE23, EL23, NL23, FR23, ES23, HU23, BE33, SE33, BG33, NL33, PL33, TR33, AT33, HU33, EL43, PL43, FR43, ES43, FR53, ES53, PL63, FR63, TR63, ES63, FR83, TR83, TRC3, DK04, SK04, CZ04, EL14, BE24, EL24, FR24, ES24, BE34, BG34, NL34, PL34, AT34, ES64, DK05, CZ05, PT15, BE25, EL25, FR25, BE35, CZ06, PT16, FR26, CZ07, PT17, CZ08, PT18, FI19, FI1B, FI1C, FI1D, FI200, EE001, MK001, LT001, IE011, SI011, AL011, IE021, SI021, AL021, AL031, HR031, HR041, MK002, LT002, IE012, SI012, AL012, IE022, SI022, AL022, AL032, HR032, HR042, MK003, LT003, LV003, IE013, SI013, AL013, IE023, SI023, AL033, HR033, HR043, EE004, MK004, LT004, SI014, AL014, IE024, SI024, AL034, HR034, HR044, MK005, LT005, LV005, SI015, AL015, IE025, AL035, HR035, HR045, EE006, MK006, LT006, LV006, SI016, HR036, HR046, EE007, MK007, LT007, LV007, SI017, HR037, HR047, EE008, MK008, LT008, LV008, SI018, HR048, LT009, LV009, HR049, LT00A, HR04A, HR04B, HR04C, CYTCC, HR04D, HR04E
#> ZA7576.13 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 97
#> ZA7576.14 0, 2, 89, 97, 98, 99
#> ZA7576.15 1, 2, 3, 8
#> ZA7576.16 1, 2, 3, 7
#> ZA7576.17 1, 2, 3, 9
#> ZA7576.18 1, 2, 3, 9
#> ZA7576.19 1, 2, 3, 9
#> ZA7576.20 1, 2, 3, 9
#> ZA7576.21 1, 2, 3, 9
#> ZA7576.22 1, 2, 3, 9
#> ZA7576.23 1, 2, 3, 9
#> ZA7576.24 1, 2, 3, 9
#> ZA7576.25 1, 2, 3, 9
#> ZA7576.26 1, 2, 3, 9
#> ZA7576.27 1, 2, 3, 9
#> ZA7576.28 1, 2, 3, 9
#> ZA7576.29 1, 2, 3, 9
#> ZA7576.30 1, 2, 3, 9
#> ZA7576.31 1, 2, 3, 9
#> ZA7576.32 1, 2, 3, 9
#> ZA7576.33 1, 2, 3, 9
#> ZA7576.34 1, 2, 3, 9
#> ZA7576.35 1, 2, 3, 9
#> ZA7576.36 1, 2, 3, 9
#> ZA7576.37 0, 1, 9
#> ZA7576.38 0, 1, 9
#> ZA7576.39 0, 1, 9
#> ZA7576.40 0, 1, 9
#> ZA7576.41 0, 1, 9
#> ZA7576.42 0, 1, 9
#> ZA7576.43 0, 1, 9
#> ZA7576.44 0, 1, 9
#> ZA7576.45 0, 1, 9
#> ZA7576.46 0, 1, 9
#> ZA7576.47 0, 1, 9
#> ZA7576.48 0, 1, 9
#> ZA7576.49 0, 1, 9
#> ZA7576.50 0, 1, 9
#> ZA7576.51 1, 2, 3, 4, 5, 6, 9, 99
#> ZA7576.52 1, 2, 3, 4, 5, 6, 9, 99
#> ZA7576.53 NA
#> ZA7576.54 NA
#> ZA7576.55 NA
#> valid_labels
#> ZA7576.1 NA
#> ZA7576.2 NA
#> ZA7576.3 NA
#> ZA7576.4 NA
#> ZA7576.5 NA
#> ZA7576.6 NA
#> ZA7576.7 NA
#> ZA7576.8 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21
#> ZA7576.9 1, 2, 3, 4, 5, 6, 8
#> ZA7576.10 1, 363, 377, 383, 388, 392, 409, 414, 416, 452, 454, 482, 531, 537, 543, 548, 555, 604, 613, 627, 656, 709, 738, 744, 747
#> ZA7576.11 1, 2, 3, 4, 5
#> ZA7576.12 ME, RS, MT, LU, CY, DE1, DE2, DE3, DE4, DE5, DE6, DE7, DE8, DE9, FR9, DEA, DEB, DEC, UKC, ITC, DED, UKD, DEE, UKE, DEF, UKF, ITF, DEG, UKG, ITG, UKH, ITH, UKI, ITI, UKJ, UKK, UKL, UKM, UKN, BE10, FR10, TR10, HU10, PT20, EL30, FR30, ES30, PT30, ES70, TR90, DK01, SK01, CZ01, SE11, EL11, NL11, PL11, RO11, ES11, AT11, PT11, BE21, SE21, EL21, NL21, PL21, RO21, FR21, TR21, ES21, AT21, HU21, BE31, SE31, BG31, NL31, PL31, RO31, TR31, AT31, HU31, BG41, EL41, NL41, PL41, RO41, FR41, TR41, ES41, PL51, FR51, TR51, ES51, PL61, FR61, TR61, ES61, FR71, TR71, FR81, TR81, TRA1, TRB1, TRC1, DK02, SK02, CZ02, SE12, EL12, NL12, PL12, RO12, ES12, AT12, BE22, SE22, EL22, NL22, PL22, RO22, FR22, TR22, ES22, AT22, HU22, BE32, SE32, BG32, NL32, PL32, RO32, TR32, AT32, HU32, BG42, EL42, NL42, PL42, RO42, FR42, TR42, ES42, PL52, FR52, TR52, ES52, PL62, FR62, TR62, ES62, FR72, TR72, FR82, TR82, TRA2, TRB2, TRC2, DK03, SK03, CZ03, EL13, NL13, ES13, AT13, BE23, SE23, EL23, NL23, FR23, ES23, HU23, BE33, SE33, BG33, NL33, PL33, TR33, AT33, HU33, EL43, PL43, FR43, ES43, FR53, ES53, PL63, FR63, TR63, ES63, FR83, TR83, TRC3, DK04, SK04, CZ04, EL14, BE24, EL24, FR24, ES24, BE34, BG34, NL34, PL34, AT34, ES64, DK05, CZ05, PT15, BE25, EL25, FR25, BE35, CZ06, PT16, FR26, CZ07, PT17, CZ08, PT18, FI19, FI1B, FI1C, FI1D, FI200, EE001, MK001, LT001, IE011, SI011, AL011, IE021, SI021, AL021, AL031, HR031, HR041, MK002, LT002, IE012, SI012, AL012, IE022, SI022, AL022, AL032, HR032, HR042, MK003, LT003, LV003, IE013, SI013, AL013, IE023, SI023, AL033, HR033, HR043, EE004, MK004, LT004, SI014, AL014, IE024, SI024, AL034, HR034, HR044, MK005, LT005, LV005, SI015, AL015, IE025, AL035, HR035, HR045, EE006, MK006, LT006, LV006, SI016, HR036, HR046, EE007, MK007, LT007, LV007, SI017, HR037, HR047, EE008, MK008, LT008, LV008, SI018, HR048, LT009, LV009, HR049, LT00A, HR04A, HR04B, HR04C, CYTCC, HR04D, HR04E
#> ZA7576.13 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 97
#> ZA7576.14 0, 2, 89, 97, 98, 99
#> ZA7576.15 1, 2, 3
#> ZA7576.16 1, 2, 3, 7
#> ZA7576.17 1, 2, 3, 9
#> ZA7576.18 1, 2, 3
#> ZA7576.19 1, 2, 3
#> ZA7576.20 1, 2, 3
#> ZA7576.21 1, 2, 3
#> ZA7576.22 1, 2, 3
#> ZA7576.23 1, 2, 3
#> ZA7576.24 1, 2, 3
#> ZA7576.25 1, 2, 3
#> ZA7576.26 1, 2, 3
#> ZA7576.27 1, 2, 3
#> ZA7576.28 1, 2, 3
#> ZA7576.29 1, 2, 3
#> ZA7576.30 1, 2, 3
#> ZA7576.31 1, 2, 3
#> ZA7576.32 1, 2, 3
#> ZA7576.33 1, 2, 3
#> ZA7576.34 1, 2, 3
#> ZA7576.35 1, 2, 3
#> ZA7576.36 1, 2, 3
#> ZA7576.37 0, 1
#> ZA7576.38 0, 1
#> ZA7576.39 0, 1
#> ZA7576.40 0, 1
#> ZA7576.41 0, 1
#> ZA7576.42 0, 1
#> ZA7576.43 0, 1
#> ZA7576.44 0, 1
#> ZA7576.45 0, 1
#> ZA7576.46 0, 1
#> ZA7576.47 0, 1
#> ZA7576.48 0, 1
#> ZA7576.49 0, 1
#> ZA7576.50 0, 1
#> ZA7576.51 1, 2, 3, 4, 5, 6
#> ZA7576.52 1, 2, 3, 4, 5, 6
#> ZA7576.53 NA
#> ZA7576.54 NA
#> ZA7576.55 NA
#> na_labels na_range n_labels n_valid_labels n_na_labels
#> ZA7576.1 NA NA 0 0 0
#> ZA7576.2 NA NA 0 0 0
#> ZA7576.3 NA NA 0 0 0
#> ZA7576.4 NA NA 0 0 0
#> ZA7576.5 NA NA 0 0 0
#> ZA7576.6 NA NA 0 0 0
#> ZA7576.7 NA NA 0 0 0
#> ZA7576.8 NA 21 21 0
#> ZA7576.9 NA 7 7 0
#> ZA7576.10 999 NA 26 25 1
#> ZA7576.11 NA 5 5 0
#> ZA7576.12 NA 308 308 0
#> ZA7576.13 NA 16 16 0
#> ZA7576.14 NA 6 6 0
#> ZA7576.15 8 NA 4 3 1
#> ZA7576.16 NA 4 4 0
#> ZA7576.17 NA 4 4 0
#> ZA7576.18 9 NA 4 3 1
#> ZA7576.19 9 NA 4 3 1
#> ZA7576.20 9 NA 4 3 1
#> ZA7576.21 9 NA 4 3 1
#> ZA7576.22 9 NA 4 3 1
#> ZA7576.23 9 NA 4 3 1
#> ZA7576.24 9 NA 4 3 1
#> ZA7576.25 9 NA 4 3 1
#> ZA7576.26 9 NA 4 3 1
#> ZA7576.27 9 NA 4 3 1
#> ZA7576.28 9 NA 4 3 1
#> ZA7576.29 9 NA 4 3 1
#> ZA7576.30 9 NA 4 3 1
#> ZA7576.31 9 NA 4 3 1
#> ZA7576.32 9 NA 4 3 1
#> ZA7576.33 9 NA 4 3 1
#> ZA7576.34 9 NA 4 3 1
#> ZA7576.35 9 NA 4 3 1
#> ZA7576.36 9 NA 4 3 1
#> ZA7576.37 9 NA 3 2 1
#> ZA7576.38 9 NA 3 2 1
#> ZA7576.39 9 NA 3 2 1
#> ZA7576.40 9 NA 3 2 1
#> ZA7576.41 9 NA 3 2 1
#> ZA7576.42 9 NA 3 2 1
#> ZA7576.43 9 NA 3 2 1
#> ZA7576.44 9 NA 3 2 1
#> ZA7576.45 9 NA 3 2 1
#> ZA7576.46 9 NA 3 2 1
#> ZA7576.47 9 NA 3 2 1
#> ZA7576.48 9 NA 3 2 1
#> ZA7576.49 9 NA 3 2 1
#> ZA7576.50 9 NA 3 2 1
#> ZA7576.51 9, 99 NA 8 6 2
#> ZA7576.52 9, 99 NA 8 6 2
#> ZA7576.53 NA NA 0 0 0
#> ZA7576.54 NA NA 0 0 0
#> ZA7576.55 NA NA 0 0 0