Checks arguments and translate a character vector (standard eval)
check_and_translate_vector_(.data, dictionary, translation, keep_order,
to_factor, is_translated, err_handler)
Either a data frame, a factor or an atomic vector.
A lama_dictionary object, holding the translations for various variables.
A character vector holding the names of the variable
translations which
should be used for assigning new labels to the variable. This names must be
a subset of the translation names returned by names(dictionary)
.
A boolean vector of length one or the same length as the
number of translations. If the vector has length one, then the same
configuration is applied to all variable translations. If the vector has
the same length as the number of arguments in ...
, then the
to each variable translation there is a corresponding boolean configuration.
If a translated variable in the data.frame is a factor variable,
and the corresponding boolean configuration is set to TRUE
, then the
the order of the original factor variable will be preserved.
A boolean vector of length one or the same length as the
number of translations. If the vector has length one, then the same
configuration is applied to all variable translations. If the vector has
the same length as the number of arguments in ...
, then the
to each variable translation there is a corresponding boolean configuration.
If to_factor
is TRUE
, then the resulting labeled
variable will be a factor. If to_factor
is set to FALSE
, then
the resulting labeled variable will be a plain character vector.
A boolean vector of length one or the same length as the
number of translations. If the vector has length one, then the same
configuration is applied to all variable translations.
If is_translated = TRUE
, then the original variable is a character
vector holding the right labels (character strings).
In this case, the labels are left unchanged, but the variables are turned
into factors with order given in the selected translations.
An error handling function