replace_list_nulls: Replace 'NULL' items in a defined depth of a list.

View source: R/utils.R

replace_list_nullsR Documentation

Replace NULL items in a defined depth of a list.

Description

Replace NULL items in a defined depth of a list.

Usage

replace_list_nulls(l, replacement = NA, depth = 2L)

Arguments

l

A list.

replacement

A replacement for NULL items.

depth

An integer scalar: depth of l to search for and replace NULL items.

Value

The list l with NULL items replaced by replacement in the defined depth.

Examples

replace_list_nulls(list(a = list(b = 1, c = NULL)))

bioinfocz/scdrake documentation built on Sept. 19, 2024, 4:43 p.m.