Learn R Programming

purrr (version 0.1.0)

update_list: Modify a list

Description

Modify a list

Usage

update_list(x, ...)

Arguments

x
A list.
...
New values of a list. Use NULL to remove values. Use a formula to evaluate in the context of the list values.

Examples

Run this code
x <- list(x = 1:10, y = 4)
update_list(x, z = 10)
update_list(x, z = ~ x + y)

Run the code above in your browser using DataLab