| length_octave | R Documentation |
Obtain the length of R objects [arrays, matrices, and vectors (including
lists)] in a manner compatible with GNU Octave/MATLAB. Some documentation
from length.
length_octave(x)
x |
An R object (array, matrix, vector) |
Return the length of the object x as an integer. "The length is 0
for empty objects, 1 for scalars (in R, a vector of length 1), and
the number of elements (in R, the length) for vectors. For matrix objects,
the length is the number of rows or columns, whichever is greater (this
odd definition is used for compatibility with MATLAB)." Source: Eaton.
Irucka Embry, Samit Basu (FreeMat)
Samit Basu (2002-2006). FreeMat v4.0, https://freemat.sourceforge.net/help/inspection_length.html.
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. Page 47.
length, lengths, size, size
library(iemisc)
import::from(matlab, ones)
# Example from pracma isempty
object1 <- matrix(0, 1, 0)
length_octave(object1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.