Description Usage Arguments Value Examples
Checks that the input is a matrix of zeroes.
1 2 3 4 5 | assert_is_zero_matrix(x, tol = 100 * .Machine$double.eps,
severity = getOption("assertive.severity", "stop"))
is_zero_matrix(x, tol = 100 * .Machine$double.eps,
.xname = get_name_in_parent(x))
|
x |
Input to check. |
tol |
Absolute values smaller than |
severity |
How severe should the consequences of the assertion be?
Either |
.xname |
Not intended to be used directly. |
TRUE
if the input is all zeroes (after coercion to be a
matrix).
1 2 3 4 5 6 | x <- matrix(numeric(9), 3)
is_zero_matrix(x)
x[1, 1] <- 100 * .Machine$double.eps
is_zero_matrix(x)
x[2, 2] <- 101 * .Machine$double.eps
is_zero_matrix(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.