is_rectangular_matrix: Is rectangular matrix

Description Usage Arguments See Also Examples

Description

is_rectangular_matrix(x) tests whether x is a rectangular matrix (i.e. number of rows different from number of columns)
is_tall_matrix(x) tests whether x is a matrix with more rows than columns
is_wide_matrix(x) tests whether x is a matrix with more columns than rows

Usage

1

Arguments

x

an R object

See Also

is_matrix, is_square_matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
rec = matrix(1:12, 4, 3)
tall = matrix(1:21, 7, 3)
wide = matrix(1:21, 3, 7)
sqr = matrix(1:9, 3, 3)

is_rectangular_matrix(rec)  # TRUE
is_rectangular_matrix(sqr)  # FALSE
is_not_rectangular_matrix(sqr)  # TRUE

is_tall_matrix(tall)  # TRUE
is_tall_matrix(wide)  # FALSE
is_tall_matrix(sqr)  # FALSE

is_wide_matrix(wide)  # TRUE
is_wide_matrix(tall)  # FALSE
is_wide_matrix(sqr)  # FALSE

gastonstat/tester documentation built on May 16, 2019, 6:38 p.m.