Unraveling R data types – The Matrix – A gentle introduction

In R, matrix is a vector with two additional attributes, the number of rows and the number of columns. Since vectors are the building blocks of matrices, like vectors, matrices are also constrained to single data type.