View source: R/convert_data_types.R
| convert_data_types | R Documentation |
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)
df |
A data frame containing the variables to be converted. |
conversions |
A named list where names correspond to variable names in the dataset, and values are the desired data types (e.g., 'numeric', 'factor'). |
A data frame with converted variable types.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.