assert_is_square_matrix

0th

Percentile

Is the matrix a square matrix?

Checks that the input is a square matrix.

Usage
assert_is_square_matrix(x, severity = getOption("assertive.severity",
  "stop"))

is_square_matrix(x, .xname = get_name_in_parent(x))

Arguments
x

Input to check.

severity

How severe should the consequences of the assertion be? Either "stop", "warning", "message", or "none".

.xname

Not intended to be used directly.

Value

TRUE if the input is all zeroes (after coercion to be a matrix).

Aliases
  • assert_is_square_matrix
  • is_square_matrix
Examples
# NOT RUN {
is_square_matrix(matrix(1:9, nrow = 3))
is_square_matrix(matrix(1:12, nrow = 3))
# }
Documentation reproduced from package assertive.matrices, version 0.0-2, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.