Learn R Programming

cheapr (version 1.1.0)

cheapr_table: Fast frequency tables - Still experimental

Description

This is not a one-to-one copy of base::table() as some behaviours differ. It is more flexible as it accepts inputs such as data frames and vctrs_rcrd objects.

Usage

cheapr_table(
  ...,
  names = TRUE,
  order = FALSE,
  na_exclude = FALSE,
  classed = FALSE
)

Value

A named integer vector if one object is supplied, otherwise an array.

Arguments

...

>=1 objects that can be converted to a factor through cheapr::factor_().

names

Should level names be kept? Default is TRUE.

order

Should result be ordered by level names? Default is FALSE.

na_exclude

Should NA values be excluded? Default is FALSE.

classed

Should a table object be returned? Default is FALSE