mat_group_quantile: Compute quantiles by group

Description Usage Arguments See Also Examples

View source: R/data_group.R

Description

Compute quantiles by group

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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

1
2
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 Aug. 10, 2021, 11:01 a.m.