I have several hundred characters imported into R from a database - each has a length of 6-7 million. This is either numerical or factorial data that has a symbol (letters) for labels - with established levels, all factors, all have some NS. As an example
vecA <- c("1",NA, "2",....,NA, "100")
vecB <- c("smith", NA, NA, ... , "jones")
Is there an effective way to force vecA to numeric and vecB to coefficient. The problem is that I don’t know where the numerical and factorial vectors are in the data, and they are tedious to go through them one by one.
source
share