I have read in some lengthy data with read.csv()
, and to my surprise the data is coming out as factors rather than numbers, so I'm guessing there must be at least one non-numeric item in the data. How can I find where these items are?
For example, if I have the following data frame:
df <- data.frame(c(1,2,3,4,"five",6,7,8,"nine",10))
I would like to know that rows 5 and 9 have non-numeric data. How would I do that?