Learn R Programming

matsbyname (version 0.6.11)

is_matrix_or_Matrix: 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)

Value

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

Arguments

a

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

Examples

Run this code
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))

Run the code above in your browser using DataLab