make_columns_numeric | R Documentation |
Take a data frame and add numeric versions of specified factor columns
make_columns_numeric(df, cols, fun = as.numeric, ...)
df |
The data.frame with the source data |
cols |
A list of column names to convert |
fun |
The function to apply to all of the columns |
... |
Additional parameters to fun |
A new data frame with additional columns. Each column listed in cols
will have
a new version added, column_n
, containing the data data as in column convert to numeric
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.