numel | R Documentation |
Obtain the number of elements of R objects [arrays, matrices, and vectors
(including lists)] in a manner compatible with GNU Octave/MATLAB. Some
documentation from length
.
numel(x, ...)
x |
An R object (array, matrix, vector) |
... |
R objects (indices idx1, idx2, ...) |
"Return the number of elements in the R object x. Optionally, if indices idx1, idx2, ... are supplied, return the number of elements that would result from the indexing a(idx1, idx2, ...)." Source: Eaton page 41.
Irucka Embry, Samit Basu (FreeMat)
r - Add a Column to a Dataframe From a List of Values - Stack Overflow answered by Matthew Plourde on Jun 21 2012. See https://stackoverflow.com/questions/11130037/add-a-column-to-a-dataframe-from-a-list-of-values/11130178.
r - Why does is.vector() return TRUE for list? - Stack Overflow answered by Andrie on May 17 2011. See https://stackoverflow.com/questions/6032772/why-does-is-vector-return-true-for-list/6032909.
Samit Basu (2002-2006). FreeMat v4.0, https://freemat.sourceforge.net/help/inspection_numel.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. Pages 46-47.
numel
, numel
, size
, length
, length_octave
library(iemisc)
import::from(matlab, ones)
xx <- list(1:26, 1:10)
numel(xx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.