named | R Documentation |
Like normal list()
, except that unnamed elements are automatically named according to their symbol
named(...)
... |
List elements |
Object of type list
with names attribute set
list()
a <- 1:10
b <- "helloworld"
l1 <- list(a, b)
names(l1) <- c("a", "b")
l2 <- named(a, b)
stopifnot(identical(l1, l2))
l3 <- list(z = a, b = b)
l4 <- named(z = a, b)
stopifnot(identical(l3, l4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.