table: Modified table function to handle NAs

Description Usage Arguments Author(s) Examples

Description

A slight modification of the table function, to include NA values in the table by default. See table for details of the function.

Usage

1
2
table(..., exclude = if (useNA == "no") c(NA, NaN), useNA = c("ifany", "no",
  "always"), dnn = list.names(...), deparse.level = 1)

Arguments

useNA

Whether to include NA values in the table. Default is now ifany.

Author(s)

R Core Team, modified by Mathieu Basille basille@ufl.edu

Examples

1
2
3
4
5
d <- factor(rep(c("A", "B", "C"), 10), levels = c("A", "B", "C",
    "D", "E"))
is.na(d) <- 3:4
d
table(d)

basille/basr documentation built on May 11, 2019, 8:32 p.m.