Learn R Programming

tidyna (version 0.4.0)

table-functions: NA-aware Table Function

Description

Drop-in replacement for table() that defaults to useNA = "ifany", showing NA counts when present.

Usage

table(..., useNA = "ifany")

Value

A contingency table of class table.

Arguments

...

Objects to cross-tabulate.

useNA

Whether to include NA values. Default "ifany".

Examples

Run this code
x <- c("a", "b", NA, "a", NA)
table(x)

Run the code above in your browser using DataLab