aggregate-validation-method: Aggregate validation results

aggregate,validation-methodR Documentation

Aggregate validation results


Aggregate results of a validation.


## S4 method for signature 'validation'
aggregate(x, by = c("rule", "record"), drop = TRUE, ...)



An object of class validation


Report on violations per rule (default) or per record?


drop list attribute if the result is list of length 1


Arguments to be passed to or from other methods.


By default, a data.frame with the following columns.

keys If confront was called with key=
npass Number of items passed
nfail Number of items failing
nNA Number of items resulting in NA
rel.pass Relative number of items passed Relative number of items failing
rel.NA Relative number of items resulting in NA

If by='rule' the relative numbers are computed with respect to the number of records for which the rule was evaluated. If by='record' the relative numbers are computed with respect to the number of rules the record was tested agains.

When by='record' and not all validation results have the same dimension structure, a list of data.frames is returned.

See Also

Other validation-methods: all,validation-method, any,validation-method, barplot,validation-method, check_that(), compare(), confront(), event(), names<-,rule,character-method, plot,validation-method, sort,validation-method, summary(), validation-class, values()


retailers$id <- paste0("ret",1:nrow(retailers))
v <- validator(
    staff.costs/staff < 25
  , turnover + other.rev==total.rev)

cf <- confront(retailers,v,key="id")
a <- aggregate(cf,by='record')

# or, get a sorted result:
s <- sort(cf, by='record')

validate documentation built on March 31, 2023, 6:27 p.m.