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

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -