I am working with a data frame that has mixed data types (numeric and character) and also has a character key as the primary identifier. I\'d like to scale and center the n
Something like this should do what you want:
library(MASS) ind <- sapply(anorexia, is.numeric) anorexia[ind] <- lapply(anorexia[ind], scale)