an R object, for example a matrix, array or data frame.
For the default method, either NULL or
a numeric vector, which is coerced to integer (by truncation).
For an array (and hence in particular, for a matrix) dim retrieves
the dim attribute of the object. It is NULL or a vector
of mode integer.The replacement method changes the "dim" attribute (provided the
new value is compatible) and removes any "dimnames"and"names" attributes.