View source: R/element_descriptors.R
num_total_elements | R Documentation |
Unlists `x`
recursively and finds the total number of elements.
num_total_elements(x, deduplicated = FALSE)
x |
List with elements. |
deduplicated |
Whether to only count the unique elements. (Logical) |
Simple wrapper for
length(unlist(x, recursive = TRUE, use.names = FALSE))
.
The total number of elements in `x`
.
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
Other element descriptors:
element_classes()
,
element_lengths()
,
element_types()
# Attach packages library(xpectr) l <- list(list(list(1, 2, 3), list(2, list(3, 2))), list(1, list(list(2, 4), list(7, 1, list(3, 8)))), list(list(2, 7, 8), list(10, 2, list(18, 1, 4)))) num_total_elements(l) num_total_elements(l, deduplicated = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.