update_list_elements: Update a subset of list elements (deprecated)

update_list_elementsR Documentation

Update a subset of list elements (deprecated)

Description

Update a subset of list elements (deprecated)

Usage

update_list_elements(
  source_list,
  update_list,
  list_layer_num = 1,
  verbose = FALSE,
  ...
)

Arguments

source_list

list with input values

update_list

list with values to populate into source_list.

list_layer_num

integer used for internal use by this function, which defines the list depth when traversing a nested list.

verbose

logical indicating whether to print verbose output.

...

additional arguments are ignored.

Details

Deprecated.

This function is intended to help update a nested source_list, a subset of whose values should be replaced with entries in update_list, leaving any original entries in source_list which were not defined in update_list.

This function may be useful when manipulating lattice or ggplot2 graphical parameters, which are often stored in a nested list structure.

Note: This function is deprecated, because there exists a function utils::modifyList() written by Lattice co-author Dr. Deepayan Sarkar, that serves the same purpose as this function. No doubt the comment above is accurate, that this function is widely used in the Lattice R package to update graphical parameters.

See Also

Other jam utility functions: blockArrowMargin(), find_colname(), fold_to_log2fold(), get_se_assaydata(), gradient_rect(), handle_highlightPoints(), log2fold_to_fold(), logAxis(), outer_legend(), points2polygonHull(), update_function_params()

Examples

# function starts with y formals, adds or updates new values
y <- list(a=1, b=4, e=NULL)
update_list_elements(y, list(b=5:6, d=1:5));

# also see the preferred function utils::modifyList below
utils::modifyList(y, list(b=5:6, d=1:5));


jmw86069/jamma documentation built on July 6, 2023, 1:09 p.m.