list.stack

0th

Percentile

Stack all list elements to tabular data

Stack all list elements to tabular data

Usage
list.stack(.data, ..., data.table = FALSE)
Arguments
.data
list of vectors, lists, data.frames or data.tables.
...
additional parameters passed to data.table::rbindlist.
data.table
TRUE to keep the result as data.table
Aliases
  • list.stack
Examples
## Not run: 
# x <- lapply(1:3, function(i) { list(a=i,b=i^2) })
# list.stack(x)
# 
# x <- lapply(1:3, function(i) { list(a=i,b=i^2,c=letters[i])})
# list.stack(x)
# 
# x <- lapply(1:3, function(i) { data.frame(a=i,b=i^2,c=letters[i]) })
# list.stack(x)
# 
# x <- lapply(1:3, function(i) { data.frame(a=c(i,i+1), b=c(i^2,i^2+1))})
# list.stack(x)
# ## End(Not run)
Documentation reproduced from package rlist, version 0.4.6.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.