Learn R Programming

rlist (version 0.2.3)

list.flatten: Flatten a list to only one level

Description

Flatten a list to only one level

Usage

list.flatten(x, use.names = TRUE)

Arguments

x
list
use.names
logical. Should the names of x be kept?

Examples

Run this code
p <- list(a=1,b=list(b1=2,b2=3),c=list(c1=list(c11="a",c12="x"),c2=3))
list.flatten(p)

Run the code above in your browser using DataLab