powered by
Arguably, this function should be in the Matrix package, but it is not. We include it here for convenience.
Matrix
is.Matrix(a)
A boolean. TRUE if a is a Matrix, FALSE otherwise.
TRUE
a
FALSE
The object to be queried if it is Matrix.
This function is not vectorized.
is.Matrix() is a wrapper for inherits(a, "Matrix).
is.Matrix()
inherits(a, "Matrix)
is.Matrix(matrix(42)) is.Matrix(Matrix::Matrix(42))
Run the code above in your browser using DataLab