I have 8 columns in a data set. Some or all have NA. I want to remove all rows if any column has an NA. What i find is happening is that my code removes the rows if there is an NA in the first column but not any of the others.
rawdata
is the data frame that has NA
's. GoodData
is suppose to be the new data frame with the NA removed.
GoodData <- rawdata[complete.cases(rawdata),]