group-pack {ruler}R Documentation

Group rule pack

Description

Group rule pack is a rule pack which defines a set of rules for groups of rows as a whole, i.e. functions which convert groups of interest to logical values. It should return a data frame with the following properties:

Details

This format is inspired by dplyr's summarise() applied to grouped data.

The most common way to define data pack is by creating a functional sequence with grouping and ending with summarise(...).

Interpretation

Group pack output is interpreted in the following way:

Exposure result of group pack is different from others in a way that column var in exposure report doesn't represent the actual column in data.

See Also

Data pack, Column pack, row pack, cell pack.

Examples

vs_am_rules <- . %>%
  dplyr::group_by(vs, am) %>%
  dplyr::summarise(
    nrow_low = n(.) > 10,
    nrow_up = n(.) < 20,
    rowmeans_low = rowMeans(.) > 19
  )

group_packs(vs_am = vs_am_rules, .group_vars = c("vs", "am"))

[Package ruler version 0.3.0 Index]