list_update: Update a list with another one

View source: R/utils.R

list_updateR Documentation

Update a list with another one

Description

This function takes two lists with named elements, the one to be updated and the #' one with the updates. If elements from the new list are not present in the one to be updated, they will be added. If they are presents, their value will be changed. Note that if elements are not named, they will not be updated.

Usage

list_update(old, new, new_first = FALSE)

Arguments

old

A list to be updated

new

A list with values to be added or updated

new_first

Should the values found in the new list not present in the old list be added at the beginning of the list or the end, Default: FALSE

Value

The updated list


Vin985/gblincoln documentation built on April 21, 2022, 1:49 a.m.