recursive_apply: Simple rapply version that deals with NULL values.

View source: R/recursive_apply.R

recursive_applyR Documentation

Simple rapply version that deals with NULL values.

Description

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.

Usage

recursive_apply(x, fn)

Arguments

x

A list (of potentially many nested lists).

fn

A function of a single argument.

Value

A list whose non-list elements have been replaced by the result of applying fn.


gwasrapidd documentation built on May 29, 2024, 4:31 a.m.