append_attr | R Documentation |
moduleList
Ordinary base lists and vectors do not retain their attributes when subsetted or appended. This function appends items to a list while preserving the attributes of items in the list (but not of the list itself).
append_attr(x, y) ## S4 method for signature 'list,list' append_attr(x, y)
x, y |
A |
Similar to updateList
but does not require named lists.
An updated list
with attributes.
Alex Chubaty and Eliot McIntire
library(igraph) # igraph exports magrittr's pipe operator tmp1 <- list("apple", "banana") %>% lapply(., `attributes<-`, list(type = "fruit")) tmp2 <- list("carrot") %>% lapply(., `attributes<-`, list(type = "vegetable")) append_attr(tmp1, tmp2) rm(tmp1, tmp2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.