Change columns to numeric if possible

change_to_num(features)

Arguments

features

dataframe of features for machine learning

Value

dataframe with numeric columns where possible

Author

Zena Lapp, zenalapp@umich.edu

Examples

class(change_to_num(data.frame(val = c("1", "2", "3")))[[1]])
#> [1] "numeric"