I have imported the csv file having 398800 obs of 30 variables. There is a variable "TOTALFRT" which is showing as character in R environment. I am trying to convert it to numeric by using as.numeric function. Wherein function is converting character to numeric but with an error message "Warning message: NAs introduced by coercion", it omitted 388800 entries. Hence I am unable to perform calculation.
Is there anyway by which I can convert NAs to numeric?? Below is the code I used for conversion :- Mac<-read.csv("July'15.csv", header = TRUE) Book=as.character(Mac$TOTALFRT) V = as.numeric(Book) -- View this message in context: http://r.789695.n4.nabble.com/Convert-character-Variables-to-numeric-tp4711518.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.