validate
Validation Tests

### Description

Performs one or more sets of validation tests. The "validate.package" function runs validation tests included in a package.

### Usage

    validate(files, test.loc, verbose = FALSE, outfile, allFiles = FALSE)
    validate.package(package, verbose = FALSE, outfile = "", lib.loc = NULL, allFiles = FALSE)
    validate.tests(test.loc)

### Arguments

files | a vector of test file names. If files is not specified, all files with a ".t" file extension located in "test.loc" directory are executed.
test.loc | a character string specifying the location of the test files. The default directory is the tests subdirectory located in the home validation package directory.
verbose | a logical value that controls the printed output. If "TRUE", each test expression is printed, regardless of whether a test fails. Otherwise, only test expressions for failed tests are printed. The default is "FALSE".
outfile | a character string specifying the name of the output file to which test results are written. By default, the output is written to the screen.
lib.loc | a character string specifying where to find the package. This is not needed if the package is installed in the one of the default package locations.
allFiles | a logical value, if "TRUE", all files in the validate directory are run. The default is to run only files with a ".t" file extension. The default is FALSE.

### Details

Each test file contains a set of expressions that are evaluated and return a value of either "TRUE" or "FALSE". The default test files are organized by related functions. Use "validate.tests" to display a list of test files for the default "test.loc" directory.
Each test is self-documenting in that it identifies the high-level function(s) being tested, the source of data, applicable references to published results, and a short description of the test case. All necessary data is also included as part of the package.
A test is considered to pass when each of the values being compared to published or otherwise known results are within a specified tolerance. The tolerance values vary among the tests. If one or more comparisons fail, the test fails.
The "validate.package" function is a front end for the "validate" function. It finds the validation files included with the specified package and then calls the main "validate" function. The function looks for validation test files in the "validate" directory under the package directory. Unless "allFiles = TRUE", only files with a ".t" file extension in the "validate" directory are run.
The "validate.tests" function displays a list of test files for the "test.loc" directory.
Value
returns "TRUE" if all test pass; otherwise returns "FALSE".
Examples

    # List then perform all tests in the default test.loc directory
    validate.tests()
    validate()
    # Validate hypothesis testing and print all test expressions as
    # they are executed
    validate("hypotest", verbose = TRUE)
    # Performs Analysis of Variance and Regression validation testing
    validate(c("anova", "regress.t"))
    # Execute all validation tests, print text expressions that
    # failed and redirect output to the file all.out
    validate(outfile ="all.out")

Package validate version 6.1.5-18
Package Index