percent: Return the percentage each value or combination of values...

View source: R/tidyverse_extensions.R

percentR Documentation

Return the percentage each value or combination of values appear in a tibble or dataframe

Description

Return the percentage each value or combination of values appear in a tibble or dataframe

Usage

percent(data, ..., .keep_n = FALSE)

Arguments

data

a tibble or dataframe

...

parameters to pass to dplyr::count()

.keep_n

logical; keep or remove the n col created by dplyr::count(). Defaults to FALSE.

Examples

# return a tibble of the percentage of gear type in the `mtcars` dataset
percent(mtcars, gear)

markjrieke/riekelib documentation built on Dec. 20, 2024, 4:57 a.m.