Description Usage Arguments Value Examples
rray_elems()
computes the number of individual elements in an array. It
generally computes the same thing as length()
, but has a more predictable
name.
1 | rray_elems(x)
|
x |
A vector, matrix, array or rray. |
A single integer. The number of elements in x
.
1 2 3 4 5 6 7 8 9 | rray_elems(1:5)
rray_elems(matrix(1, 2, 2))
# It is different from `vec_size()`,
# which only returns the number of
# observations
library(vctrs)
vec_size(matrix(1, 2, 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.