Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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 class 'factor'
includeNA(x, label = "(Missing)", first = FALSE, ...)

## Default S3 method:
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?

Author(s)

Ethan Heinzen

See Also


arsenal

An Arsenal of 'R' Functions for Large-Scale Statistical Summaries

v3.6.2
GPL (>= 2)
Authors
Ethan Heinzen [aut, cre], Jason Sinnwell [aut], Elizabeth Atkinson [aut], Tina Gunderson [aut], Gregory Dougherty [aut], Patrick Votruba [ctb], Ryan Lennon [ctb], Andrew Hanson [ctb], Krista Goergen [ctb], Emily Lundt [ctb], Brendan Broderick [ctb], Maddie McCullough [art]
Initial release
2021-02-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.