Test if an object is a square matrix (or not) (i.e. same
number of rows as number of columns)
an R object
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
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.
Questions? Problems? Suggestions? Tweet to @rdrrHQian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.