df_force_numeric {W4MRUtils} | R Documentation |
Convert data frame to numeric.
Description
df_force_numeric Converts integer columns of a data frame into numeric.
Usage
df_force_numeric(df, cols = NULL)
Arguments
df |
The data frame. |
cols |
The set of columns to convert to numeric.
By default (when set to |
Value
The converted data.frame
.
Examples
# Convert an integer data frame
df <- data.frame(a = as.integer(c(1, 4)), b = as.integer(c(6, 5)))
df <- W4MRUtils::df_force_numeric(df)
[Package W4MRUtils version 1.0.0 Index]