unnest: Unnest a nested list.

Description Usage Arguments Value Author(s) Examples

View source: R/unnest.r

Description

Unnest a nested list.

Usage

1
unnest(x)

Arguments

x

A nested list.

Value

A list, with no nesting, hopefully.

Author(s)

Scott Chamberlain myrmecocystus@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# a nested list
mylist <- list(); mylist_ <- list()
for(i in 1:5) {
   for(j in 1:5) {
     mylist[[j]] <- i*j
   } 
   mylist_[[i]] <- mylist
 }

# Unnest the list
unnest(mylist_)[[1]]

## End(Not run)

sckott/sacbox documentation built on Sept. 3, 2020, 7:22 p.m.