Learn R Programming

validate (version 0.1.7)

compare: Compare similar data sets

Description

Compare different versions of the same dataset with respect to predifined indicators. Results are simplified in a sensible way.

Usage

compare(x, ...)

# S4 method for validator compare(x, ..., .list = NULL, how = c("to_first", "sequential"))

# S4 method for indicator compare(x, ..., .list = NULL)

Arguments

x

An R object

...

(named) data sets (e.g. data.frames)

.list

Optional list of data sets, will be concatenated with ....

how

how to compare

Value

For validator: An array where each column represents one dataset. The rows count the following attributes:

  • Number of validations performed

  • Number of validations that evaluate to NA (unverifiable)

  • Number of validations that evaluate to a logical (verifiable)

  • Number of validations that evaluate to TRUE

  • Number of validations that evaluate to FALSE

  • Number of extra validations that evaluate to NA (new unverifiable)

  • Number of validations that still evaluate to NA (still unverifialble)

  • Number of validations that still evaluate to TRUE

  • Number of extra validations that evaluate to TRUE

  • Number of validations that still evaluate to FALSE

  • Number of extra validations that evaluate to FALSE

For indicator: A list with the following components:

  • numeric: An array collecting results of scalar indicator (e.g. mean(x)).

  • nonnumeric: An array collecting results of nonnumeric scalar indicators (e.g. names(which.max(table(x))))

  • array: A list of arrays, collecting results of vector-indicators (e.g. x/mean(x))

See Also