View source: R/recursive_apply.R
recursive_apply | R Documentation |
Like rapply
, recursive_apply
is a recursive
version lapply
but contrary to
rapply
, recursive_apply
does not ignore
NULL
values. Each element of the list which is not itself
a list is replaced by the result of applying fn
. If down the line
there are data.frames, then their class is preserved.
recursive_apply(x, fn)
x |
A list (of potentially many nested lists). |
fn |
A function of a single argument. |
A list whose non-list elements have been replaced by the result of
applying fn
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.