Skip to content
Prev 30498 / 63421 Next

is.matrix

The point was that c(1, 1, 2) is not a matrix but a vector, two distinct
things in R.
[1] "numeric"
[1] "matrix"
[1] "matrix"

The transpose operation is only defined for matrices, so if you insist to
apply it to a vector, it first needs to be coersed to a matrix and then
transposed.  The result of this operation is a matrix. The result of
transposing this matrix will still be a matrix.

-Christos