powered by
Guess a minimum metadata data frame from study data. Minimum required variable attributes are:
prep_study2meta( study_data, level = c(VARATT_REQUIRE_LEVELS$REQUIRED, VARATT_REQUIRE_LEVELS$RECOMMENDED), cumulative = TRUE, convert_factors = FALSE )
a meta_data data frame or a list with study data and metadata, if convert_factors == TRUE.
convert_factors == TRUE
data.frame the data frame that contains the measurements
enum levels to provide (see also VARATT_REQUIRE_LEVELS)
logical include attributes of all levels up to level
logical convert factor columns to coded integers. if selected, then also the study data will be updated and returned.
dataquieR:::util_get_var_att_names_of_level(VARATT_REQUIRE_LEVELS$REQUIRED) #> VAR_NAMES DATA_TYPE MISSING_LIST_TABLE #> "VAR_NAMES" "DATA_TYPE" "MISSING_LIST_TABLE"
The function also tries to detect missing codes.
if (FALSE) { dataquieR::prep_study2meta(Orange, convert_factors = FALSE) }
Run the code above in your browser using DataLab