dim {base} R Documentation

Dimensions of an Object

Description


Retrieve or set the dimension of an object.

Usage

dim(x);

Arguments

x

an R Object, For example a matrix, array Or data frame.

Details

The functions dim and dim<- are internal generic primitive functions. Dim has a method For data.frames, which returns the lengths Of the row.names attribute Of x And Of x (As the numbers Of rows And columns respectively).

Authors

SMRUCC genomics Institute

Value

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.

clr value class

Examples


[Package base version 2.33.856.6961 Index]