Learn R Programming

validate (version 1.1.5)

event: Get or set event information metadata from a 'confrontation' object.

Description

The purpose of event information is to store information that allows for identification of the confronting event.

Usage

event(x)

event(x) <- value

# S4 method for confrontation event(x)

# S4 method for confrontation event(x) <- value

Value

A a character vector with elements

"agent", which defaults to the R version and platform returned by

R.version, a timestamp ("time") in ISO 8601 format and a

"actor" which is the user name returned by Sys.info(). The last element is called "trigger" (default NA_character_), which can be used to administrate the event that triggered the confrontation.

Arguments

x

an object of class confrontation

value

[character] vector of length 4 with event identifiers.

References

Mark van der Loo and Olav ten Bosch (2017) Design of a generic machine-readable validation report structure, version 1.0.0.

See Also

Other confrontation-methods: [,expressionset-method, as.data.frame,confrontation-method, confront(), confrontation-class, errors(), keyset(), length,expressionset-method, values()

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

Other indication-methods: confront(), indication-class, summary()

Examples

Run this code
data(retailers)
rules <- validator(turnover >= 0, staff >=0)
cf <- confront(retailers, rules)
event(cf)

# adapt event information
u <- event(cf)
u["trigger"] <- "spontaneous validation"
event(cf) <- u
event(cf)

Run the code above in your browser using DataLab