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.data", blank.lines.skip=false)
Comments
Post a Comment