tab_percentiles {tidycomm}R Documentation

Tabulate percentiles for numeric variables

Description

This function tabulates specified percentiles for given numeric variables. If no variables are provided, the function will attempt to describe all numeric (either integer or double) variables found within the input. The percentiles are calculated based on the levels parameter, which defaults to every 10% from 10% to 90%. NA values are always removed because the concept of a percentile is based on ranking. As NA is not a value, it cannot be ordered in relation to actual numbers.

Usage

tab_percentiles(
  data,
  ...,
  levels = c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1)
)

Arguments

data

a tibble or a tdcmm model that contains the numeric data to be tabulated.

...

Variables within the data for which to tabulate the percentiles. If no variables are provided, all numeric variables are used.

levels

a numeric vector specifying the percentiles to compute. Defaults to c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0).

Value

a tdcmm model

See Also

Other descriptives: describe_cat(), describe()

Examples

WoJ %>% tab_percentiles(work_experience)
WoJ %>% tab_percentiles(work_experience, autonomy_emphasis)


[Package tidycomm version 0.4.1 Index]