arsenal (version 3.3.0)

NA.operations: Some functions to handle NAs

Description

allNA tests if all elements are NA, and includeNA sets the NAs in a character vector or factor to an explicit label.

Usage

allNA(x)

includeNA(x, label, ...)

# S3 method for factor includeNA(x, label = "(Missing)", first = FALSE, ...)

# S3 method for default includeNA(x, label = "(Missing)", ...)

Arguments

x

An object

label

A character string denoting the label to set NAs to.

...

Other arguments (not in use at this time).

first

Logical; should the new label be the first level?

See Also

is.na, anyNA