flat.list: Combine Values into a Flat List (a List with no List...

flat.listR Documentation

Combine Values into a Flat List (a List with no List Elements)

Description

Construct a flat list (a list with no list elements).

Usage

flat.list(...)

Arguments

...

objects, possible named.

Details

rapply is used to find each non-list element, then is assigned into the next element of a list. As the non-list elements are being recursed through, the names are taken and assigned to the return list.

Value

A list.

Examples

x <- list(a = 1:5, list(list(b = 6:10), c = 11:15), list(d = exp(-4)))
print(x)
flat.list(x)
flat.list(x, e = "testing")

ArcadeAntics/essentials documentation built on Nov. 7, 2024, 4:33 p.m.