Converting vectors to numeric in mixed-type dataframe

Coercing variables of character and numeric type into a single dataframe yields all vectors to be defined as factors

all <- data.frame(cbind(site, year, model, x, y, z))

The following converts selected variables from “factor” back to “numeric”
all$x <- as.numeric(x)
all$y <- as.numeric(y)
all$z <- as.numeric(z)