powered by
lifecycle::badge("experimental")
Applies typeof() to each element of `x` (without recursion).
typeof()
`x`
element_types(x, keep_names = FALSE)
The type of each element.
List with elements.
Whether to keep existing names. (Logical)
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
Simple wrapper for unlist(lapply(x, typeof)).
unlist(lapply(x, typeof))
Other element descriptors: element_classes(), element_lengths(), num_total_elements()
element_classes()
element_lengths()
num_total_elements()
# Attach packages library(xpectr) l <- list("a" = c(1,2,3), "b" = "a", "c" = NULL) element_types(l) element_types(l, keep_names = TRUE)
Run the code above in your browser using DataLab