Using read.csv in R drops rows that have a NA in them? -


i executing line of code import file

flowers <- read.csv("http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data") 

149 rows come in. problem there 151 rows in original dataset. when @ unique values last column (#5), 2 rows "na" getting dropped:

unique(flowers[,5]) 

what have include 2 rows?

you can use blank.lines.skip=false in read.csv blank lines well

flowers <- read.csv("http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.dat‌​a",         blank.lines.skip=false) 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -