listFlatten: Flatten list completely

View source: R/listFlatten.R

listFlattenR Documentation

Flatten list completely

Description

Flattens a list recursively, converting vector elements to list elements, producing a one-level list with all elements length 1. Names may not be preserved.

Usage

listFlatten(data)

Arguments

data

list or vector

Value

single-level list with all list elements of length 1

Examples

listFlatten(list(list(list(1:5))))
listFlatten(7)
listFlatten(7:9)
listFlatten("foo")
listFlatten(c("foo","gorp"))
data <- list(list(3:4,"apple"), TRUE, list(list(5.1,"foo"),NULL))
listFlatten(data)


allopole/ROSC documentation built on May 9, 2023, 10:09 p.m.