data-pack {ruler}R Documentation

Data rule pack

Description

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

Details

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

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

See Also

Group pack, Column pack, row pack, cell pack.

Examples

data_dims_rules <- . %>%
  dplyr::summarise(
    nrow_low = nrow(.) > 10,
    nrow_up = nrow(.) < 20,
    ncol_low = ncol(.) > 5,
    ncol_up = ncol(.) < 10
  )
data_na_rules <- . %>%
  dplyr::summarise(all_not_na = Negate(anyNA)(.))

data_packs(
  data_nrow = data_dims_rules,
  data_na = data_na_rules
)

[Package ruler version 0.3.0 Index]