powered by
Drop rows containing missing values in selected columns.
na_omit_selection (dat, varsToOmitIfNA)
A data.frame with deleted rows
a data.frame
Name or column number of the variables which should be considered for row deletion due to NAs
dat1 <- data.frame ( v1 = c(1,NA,3), v2 = c(letters[1:2],NA), v3 = c(NA, NA, TRUE), stringsAsFactors = FALSE) na.omit(dat1) na_omit_selection(dat1, "v2")
Run the code above in your browser using DataLab