Converts columns in a data frame to specified types based on a named list mapping column names to target types. Supports conversion to numeric, character, factor, integer, logical, and other R data types.
convert_data_types(df, conversions)A data frame with converted variable types.
A data frame containing the variables to be converted.
A named list where names correspond to variable names in the dataset, and values are the desired data types (e.g., 'numeric', 'factor').