Learn R Programming

cwhmisc (version 6.0)

Ddim: dim of vectors and arrays

Description

Get length of vectors and dimension of arrays in a unified manner.

Usage

Ddim(x)

Arguments

x
vector or array

Value

Integer vector containing length of vector or dimension of array.

Examples

Run this code
  Ddim(matrix(1:12,3,4))  #   3 4
  Ddim(rep(0,5))  # 5

Run the code above in your browser using DataLab