Search notes:

R function: is.matrix

is.matrix(obj) returns true if obj is a vector and has a dim attribute whose length is 2:
vec <- c(1, 2, 3, 4, 5, 6, 7, 8);
is.matrix(vec);
#
# FALSE

dim(vec) <- c(8);
is.matrix(vec);
#
# FALSE

dim(vec) <- c(4, 2);
is.matrix(vec);
#
# TRUE

dim(vec) <- c(2, 2, 2);
is.matrix(vec);
#
# FALSE
Github repository about-r, path: /functions/is/matrix/two-dimensional.R
An object that is created with matrix is, of course, a matrix:
m = matrix( c(   1,   2,   3,   4, 
                11,  22,  33,  44,
               111, 222, 333, 444,
              1111,2222,3333,4444),
             nrow=4,
             ncol=4)

is.matrix(m)
# [1] TRUE
Github repository about-r, path: /functions/is.matrix.R

See also

R matrix class, matrix data structure.
Index to (some) R functions

Index