mat_group_quantile: Compute quantiles by group

View source: R/data_group.R

mat_group_quantileR Documentation

Compute quantiles by group

Description

Compute quantiles by group

Usage

mat_group_quantile(
  df,
  .value_var,
  ...,
  .probs = c(0.05, 0.25, 0.5, 0.75, 0.95),
  na.rm = TRUE
)

mat_group_quantile_table(
  df,
  .value_var,
  ...,
  .breaks = c(0.05, 0.25, 0.5, 0.75, 0.95),
  wide = TRUE
)

Arguments

df

The df

.value_var

the column of values

.probs

quantile probs

na.rm

Remove NA when computing quantile?

.breaks

the breaks to compute table over

wide

should the table be wide?

...

the group_by variables

See Also

mat_df_trim_quant

Examples

mat_group_quantile(iris, Petal.Width, Species)
mat_group_quantile_table(iris, Petal.Width, Species, .breaks = c(0.2, 0.5, 1, Inf))

MatthieuStigler/matPkg documentation built on Sept. 19, 2024, 5:19 a.m.