prep_study2meta {dataquieR} | R Documentation |
Guess a metadata data frame from study data.
Description
Guess a minimum metadata data frame from study data. Minimum required variable attributes are:
Usage
prep_study2meta(
study_data,
level = c(VARATT_REQUIRE_LEVELS$REQUIRED, VARATT_REQUIRE_LEVELS$RECOMMENDED),
cumulative = TRUE,
convert_factors = FALSE
)
Arguments
study_data |
data.frame the data frame that contains the measurements |
level |
enum levels to provide (see also VARATT_REQUIRE_LEVELS) |
cumulative |
logical include attributes of all levels up to level |
convert_factors |
logical convert factor columns to coded integers. if selected, then also the study data will be updated and returned. |
Details
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.
Value
a meta_data data frame or a list with study data and metadata, if
convert_factors == TRUE
.
Examples
## Not run:
dataquieR::prep_study2meta(Orange, convert_factors = FALSE)
## End(Not run)
[Package dataquieR version 2.1.0 Index]