Learn R Programming

reshape (version 0.8.9)

melt.list: Melt a list

Description

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

Usage

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

Arguments

data
...

other arguments passed down

level

Examples

Run this code
# NOT RUN {
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))))
# }

Run the code above in your browser using DataLab