dim of vectors and arrays

Description

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

Usage

1
  Ddim(x)

Arguments

x

vector or array

Value

Integer vector containing length of vector or dimension of array.

Author(s)

Christian W. Hoffmann, christian@echoffmann.ch

Examples

1
2
  Ddim(matrix(1:12,3,4))  #   3 4
  Ddim(rep(0,5))  # 5

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.