I have a mixed class dataframe (numeric and factor) where I am trying to convert the entire data frame to numeric. The following illustrates the type of data I am working w
> df2 <- data.frame(sapply(df1, function(x) as.numeric(as.character(x)))) > df2 a b 1 0.01 2 2 0.02 4 3 0.03 5 4 0.04 7 > sapply(df2, class) a b "numeric" "numeric"