validate (version 0.9.2)

run_validation_file: Run a file with confrontations. Capture results

Description

A validation script is a regular R script, intersperced with confront or check_that statements. This function will run the script file and capture all output from calls to these functions.

Usage

run_validation_file(file, verbose = TRUE)

run_validation_dir(dir = "./", pattern = "^validate.+[rR]", verbose = TRUE)

# S3 method for validations print(x, ...)

# S3 method for validations summary(object, ...)

Arguments

file

[character] location of an R file.

verbose

[logical] toggle verbose output.

dir

[character] path to directory.

pattern

[characer] regular expression that selects validation files to run.

x

An R object

...

Unused

object

An R object

Value

run_validation_file: An object of class validations. This is a list of objects of class validation.

run_validation_dir: An object of class validations. This is a list of objects of class validation.

print: NULL, invisibly.

summary: A data frame similar to the data frame returned when summarizing a validation object. There are extra columns listing each call, file and first and last line where the code occurred.