Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

DIM

Get the dimensions of an object


Description

Get the dimensions of an object, retuning the length if that object has no dim attribute.

Usage

DIM(x)

Arguments

x

Any object.

Value

A integer vector of non-negative values.

See Also

Examples

# For data frames and matrices, DIM is the same as dim.
DIM(sleep) 
# For vectors (and other objects without a dim attribute), DIM is the 
# same as length.
DIM(1:10)
DIM(list(x = 1:10))

assertive.properties

Assertions to Check Properties of Variables

v0.0-4
GPL (>= 3)
Authors
Richard Cotton [aut, cre]
Initial release
2016-12-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.