CheckThat: An alternative version of assert_that, outputting a modified...

Description Usage Arguments Value Note Examples

View source: R/utils_assert.R

Description

An alternative version of assert_that, outputting a modified error message.

Usage

1

Arguments

...

see 'assert_that'.

env

see 'assert_that'.

name

(string) name of the object to output in the error message.

Value

'TRUE' if tests pass; otherwise throws an error.

Note

Replaces anything up to ' is not ' in the error message with the value of 'name'.

Examples

1
2
3
4
5
# Outputs "Column 'foo' is not an integer-valued numeric vector"
# if 'x' fails the test.
## Not run: 
CheckThat(is.integer.valued(x), name="Column 'foo'")
## End(Not run)

google/GeoexperimentsResearch documentation built on May 17, 2019, 7:42 a.m.