Keeps the original nested-list structure. Leaves for which .p
returns FALSE are replaced by NULL.
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.
- .p
A predicate function, formula, or function-like object coercible by
rlang::as_function().- .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).
See also
Other lstrrr-purrrlike:
list_flatten(),
list_imap(),
list_iwalk(),
list_map(),
list_map2(),
list_modify_if(),
list_pmap(),
list_pwalk(),
list_walk(),
list_walk2()
