count.character {campfin}R Documentation

Count values in a character vector

Description

Method for dplyr::count()

Usage

## S3 method for class 'character'
count(x, sort = FALSE, prop = FALSE)

Arguments

x

A character vector.

sort

If TRUE, sort the result so that the most common values float to the top.

prop

If TRUE, compute the fraction of marginal table.

Value

A tibble of element counts

Examples

x <- sample(LETTERS)[rpois(1000, 10)]
table(x)
dplyr::count(x)
dplyr::count(x, sort = TRUE, prop = TRUE)

[Package campfin version 1.0.9 Index]