Eliminate all observations with at least one NA in a data frame

Description

Generates two matrices: One with complete observations and one with all observations containing at least one missing value.

Usage

1

Arguments

dat

Dataframe with observations in rows.

Value

complete

Dataframe containing complete observations.

incomplete

Dataframe containing observations with at least one NA.

Author(s)

Kaspar Rufibach (maintainer), kaspar.rufibach@gmail.com,
http://www.kasparrufibach.ch

See Also

complete.cases

Examples

1
2
3
4
pat <- 1:10; var1 <- rnorm(10); var2 <- factor(round(rgamma(10, 2, 1)))
dat <- data.frame(cbind(pat, var1, var2))
dat[c(2, 8), 3] <- NA
eliminateNA(dat)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.