melt-list-8m: Melt a list

melt.listR Documentation

Melt a list

Description

Melting a list recursively melts each component of the list and joins the results together

Usage

## S3 method for class 'list'
melt(data, ..., level=1)

Arguments

data
...

other arguments passed down

level

Author(s)

Hadley Wickham <h.wickham@gmail.com>

Examples

a <- as.list(1:4)
melt(a)
names(a) <- letters[1:4]
melt(a)
attr(a, "varname") <- "ID"
melt(a)
a <- list(matrix(1:4, ncol=2), matrix(1:6, ncol=2))
melt(a)
a <- list(matrix(1:4, ncol=2), array(1:27, c(3,3,3)))
melt(a)
melt(list(1:5, matrix(1:4, ncol=2)))
melt(list(list(1:3), 1, list(as.list(3:4), as.list(1:2))))

reshape documentation built on April 12, 2022, 5:07 p.m.