IsMatrix: Test for a Matrix

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/IsMatrix.R

Description

IsMatrix() returns TRUE if A is a matrix, and FALSE otherwise.

Usage

1
2
3
4
5
6
7
IsMatrix(A)

## Default S3 method:
IsMatrix(A)

## S3 method for class 'yac_symbol'
IsMatrix(A)

Arguments

A

Input.

Details

A matrix is a rectangular array of numbers, symbols, or expressions, with m rows by n columns typically denoted by uppercase roman letters such as \mathbf{A}, \mathbf{B}, and \mathbf{C}.

Value

Logical.

Author(s)

Ivan Jacob Agaloos Pesigan

References

Wikipedia: Matrix (mathematics)

See Also

Other predicate functions: IsDiagonal(), IsIdempotent(), IsInvertible(), IsNilpotent(), IsOrthogonal(), IsPositiveDefinite(), IsScalar(), IsSingular(), IsSquareMatrix(), IsSymmetric(), IsVector(), MatrixCheck()

Examples

1
2
3
4
5
6
# TRUE
IsMatrix(matrix(1:10, ncol = 2))
IsMatrix(matrix(1:10, nrow = 2))

# FALSE
IsMatrix(1:5)

jeksterslab/matrixR documentation built on Feb. 22, 2021, 8:10 a.m.