Description Usage Arguments Value Note Examples
An alternative version of assert_that, outputting a modified error message.
1 | CheckThat(..., env = parent.frame(), name = NULL)
|
... |
see 'assert_that'. |
env |
see 'assert_that'. |
name |
(string) name of the object to output in the error message. |
'TRUE' if tests pass; otherwise throws an error.
Replaces anything up to ' is not ' in the error message with the value of 'name'.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.