build_custom_mapping: Build column name mappings

Description Usage Arguments Details Value

View source: R/data_preparation.R


build_custom_mapping creates a vector of column name mappings for the user to read her or his custom dataframe


build_custom_mapping(data, language = "de", prompt_mapping = TRUE)



the custom dataframe for which the user wants to build a custom mapping


a character string representing the language in which the columns will be displayed during the mapping prompt ("de" or "fr" or "it" or "en")


a boolean indicating whether the function prompts the user for the exact mapping of his dataframe or whether the columns are mapped automatically by order


Builds a mapping from the custom column names of a given data.frame to the variable names used in the standard analysis model. If prompt_mapping is set to TRUE, the function prompts the mapping for each column of the data.frame. If prompt_mapping is set to FALSE, the mapping is built using the order of the columns of the given data.frame.


A named vector of characters, where the name indicates the column name in the original data.frame and the value indicates the column name as used by the standard analysis model.

logib documentation built on Aug. 27, 2020, 5:06 p.m.