missingnessRemove: Remove missing with summary

Description Usage Arguments Details Value Examples

View source: R/missing.R

Description

Removes the missing values from a data frame of factors, and returns a summary of what is removed, by column.

Usage

1
  missingnessRemove(x, missingValues)

Arguments

x

a data frame

missingValues

A character vector, listing the values of the factors that correspond to missing values.

Details

Each column is releveled after the removal, so that the factor contains only values that exist after the missing values have been removed. Note that this could mean that levels that are NOT missing values (ie supplied in missingValues) could be removed. This happens when a level is only present when another variable is missing.

Value

The supplied data frame with rows that include a missing value removed.

Examples

1
2
dat <- esoph[, 1:3]
# done

rjbgoudie/utils.rjbg documentation built on May 27, 2019, 9:13 a.m.