ezUpdateMissingParam: Updates one list with another list.

View source: R/util.R

ezUpdateMissingParamR Documentation

Updates one list with another list.

Description

Updates a list with the values from another list if the list is missing them or if the values are NULL/NA

Usage

ezUpdateMissingParam(list1, with_list)

Arguments

list1

a list or ezParam object

with_list

a list or ezParam object which with to update list1

Author(s)

Rehrauer, Hubert

Schmid, Peter

Examples

l1 <- list(a = 1, b = c("foo", "bar", "bar"), c = 3, e="foo", f="clause")
l2 <- list(a = 1, b = c("baz", "qux"), d = 3, f=NULL)
ezUpdateMissingParam(l2, l1)
# Returns list(a = 1, b = c("baz", "qux"), d = 3, f = "clause", c = 3, e = "foo")

uzh/ezRun documentation built on March 5, 2025, 3:41 p.m.