is_square_matrix.Rd
Test if an object is a square matrix (or not) (i.e. same number of rows as number of columns)
is_square_matrix(x)
an R object
is_matrix, is_square_numeric_matrix is_rectangular_matrix
is_matrix
is_square_numeric_matrix
is_rectangular_matrix
m1 = matrix(1:9, 3, 3) m2 = matrix(1:12, 4, 3) is_square_matrix(m1) # TRUE #> [1] TRUE is_square_matrix(m2) # FALSE #> [1] FALSE is_not_square_matrix(m2) # TRUE #> [1] TRUE