is_square_matrix: Is square matrix

Description Usage Arguments See Also Examples

Description

Test if an object is a square matrix (or not) (i.e. same number of rows as number of columns)

Usage

1

Arguments

x

an R object

See Also

is_matrix

Examples

1
2
3
4
5
6
m1 = matrix(1:9, 3, 3)
m2 = matrix(1:12, 4, 3)

is_square_matrix(m1) # TRUE
is_square_matrix(m2) # FALSE
is_not_square_matrix(m2) # TRUE


Search within the tester package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.