powered by
Helper function to update items in an R list.
list.update(main_list, new_list, ...)
A list is returned.
list
A list, which items should be updated.
A list with new values of items from main_list that should be updated. All names of new_list must be present in main_list.
main_list
new_list
Further arguments passed to utils::modifyList().
utils::modifyList()
This function is a save wrapper around utils::modifyLists to update items in R lists as it checks for the input types and only accepts named lists.
utils::modifyLists
l1 <- list("a" = 1, "b" = 2) l2 <- list("a" = 3, "b" = 4) list.update(l1, l2)
Run the code above in your browser using DataLab