powered by
Remove rows (or elements) that contain missing values.
na_removal()
returns an object of class na_removal
na_removal
For data frames or matrices, removes rows with any NA. For vectors, removes NA values.
data(iris) iris.na <- iris iris.na$Sepal.Length[2] <- NA obj <- na_removal() iris.clean <- transform(obj, iris.na) nrow(iris.clean)
Run the code above in your browser using DataLab