listNamed | R Documentation |
This is a convenience wrapper around newList <- list(a = 1); names(newList) <- "a"
.
listNamed(...)
... |
Any elements to add to a list, as in |
This will return a named list, where names are the object names, captured internally in the function and assigned to the list. If a user manually supplies names, these will be kept (i.e., not overwritten by the object name).
a <- 1
b <- 2
d <- 3
(newList <- listNamed(a, b, dManual = d)) # "dManual" name kept
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.