Map over leaves of a nested list
Arguments
- .x
A nested list to traverse.
Lists are traversed recursively. Non-list objects are treated as leaves. Data frames are not traversed and are treated as leaf values.
- .f
A function, formula, or function-like object coercible by
rlang::as_function(). Additional arguments supplied through...are passed on to.f.- ...
Additional arguments passed to
.f.- .progress
Whether to show a progress
Use TRUE to turn on a basic progress, use a string to give it a name, or use a list to customize the progress bar (see
?cli::cli_progress_barand https://cli.r-lib.org/articles/progress-advanced.html#cli_progress_bar for details).
Value
A list with the same nested structure as .x, where each leaf has been
replaced by the result of calling .f on that leaf.
See also
Other lstrrr-purrrlike:
list_flatten(),
list_imap(),
list_iwalk(),
list_map2(),
list_modify_if(),
list_pmap(),
list_pwalk(),
list_walk(),
list_walk2()
