collect | R Documentation |
Collect Elements of Sublists
collect(x, element, default = NULL)
x |
a list of lists |
element |
name of list element to be collected from each sublist of
|
default |
value to be returned for lists that do not have an element
called |
x <- list( list(a = 1, b = 2), list(c = 3, a = 4), list(d = 5, e = 6) ) collect(x, "a") collect(x, "a", default = 99)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.