Learn R Programming

rlist (version 0.3-1)

list.stack: Stack all list members to construct a data.frame

Description

Stack all list members to construct a data.frame

Usage

list.stack(.data)

Arguments

.data
list of vectors, lists, or data.frames.

Examples

Run this code
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)

Run the code above in your browser using DataLab