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)
A list whose non-list elements have been replaced by the result of
applying fn
.
A list (of potentially many nested lists).
A function of a single argument.