I have used the following link to convert my factors to numeric, but get the following warning message. How can this be overcome?
typ_A <- c("2S", "3C", "3H", "4P", "4S", "5H", "CV",
"EX", "MV", "PU", "SW", "TR", "UV", "VN",
"2C", "2S", "3C", "3H", "4P", "4S", "5H", "CV",
"EX", "MV", "PU", "SW", "TR", "UV")
typ_B <- c(1:28)
df1 <- data.frame(typ_A, typ_B)
df1$typ_A2 <- as.numeric(levels(df1$typ_A))[df1$typ_A]