size: Size of R objects (GNU Octave/MATLAB compatible)

sizeR Documentation

Size of R objects (GNU Octave/MATLAB compatible)

Description

Provides the dimensions of R objects in a manner compatible with GNU Octave/MATLAB. This function is the same as size, except this size can find the size of character vectors too. Some documentation from size.

Usage

size(x, k)

Arguments

x

An R object (array, vector, or matrix)

k

integer specifying a particular dimension

Value

"Return the number of rows and columns of the object x as a numeric vector. If given a second argument, size will return the size of the corresponding dimension." Source: Eaton.

Author(s)

Hans Werner Borchers (pracma size), Irucka Embry

Source

pracma size function definition - R package pracma created and maintained by Hans Werner Borchers. See size.

References

John W. Eaton, David Bateman, Søren Hauberg, and Rik Wehbring (November 2022). GNU Octave: A high-level interactive language for numerical computations: Edition 7 for Octave version 7.3.0. https://docs.octave.org/octave.pdf. Pages 47-48.

See Also

dim, size

Examples


# Example from GNU Octave ndims function reference

size(matlab::ones(4, 1, 2, 1))





iemisc documentation built on Sept. 25, 2023, 5:09 p.m.