Data frame typecasting entire column to character from numeric
问题 Suppose I have a data.frame that's completely numeric . If I make one entry of the first column a character (for example), then the entire first column will become character . Question : How do I reverse this. That is, how do I make it such that any character objects inside the data.frame that are "obviously" numeric objects are forced to be numeric ? MWE: test <- data.frame(matrix(rnorm(50),10)) is(test[3,1]) test[1,1] <- "TEST" is(test[3,1]) print(test) So my goal here would be to go FROM