is_matrix_or_Matrix: Tells whether an object is one of a matrix or a Matrix

View source: R/utilities_Matrix.R

is_matrix_or_MatrixR Documentation

Tells whether an object is one of a matrix or a Matrix

Description

Often, it helps to know whether an object is a matrix or a Matrix, and you don't care which. This function helps in those situations.

Usage

is_matrix_or_Matrix(a)

Arguments

a

The object about which we want to know if it is a matrix or a Matrix.

Value

TRUE when a is a matrix or a Matrix. FALSE otherwise.

Examples

is_matrix_or_Matrix(42)
is_matrix_or_Matrix(matrix(42))
is_matrix_or_Matrix(Matrix::Matrix(42))
is_matrix_or_Matrix(matsbyname::Matrix(42))

MatthewHeun/byname documentation built on Feb. 17, 2024, 4:51 p.m.