melt

0th

Percentile

Convert an object into a molten data frame.

Convert an object into a molten data frame.

Keywords
manip
Usage
melt(data, ...)
Arguments
data
Data set to melt
...
further arguments passed to or from other methods.
Details

This the generic melt function. See the following functions for the details about different data structures:

Aliases
  • melt
Documentation reproduced from package reshape2, version 1.0, License: MIT

Community examples

lixx5423@d.umn.edu at Feb 27, 2019 reshape2 v1.4.3

library(reshape2) # example data frame x = data.frame( id = c(1, 1, 2, 2), blue = c(1, 0, 1, 0), red = c(0, 1, 0, 1) ) # collapse the data frame melt(data = x, id.vars = "id", measure.vars = c("blue", "red"))

qianqianxia1993@gmail.com at Feb 23, 2019 reshape2 v1.4.3

library(reshape2) # example data frame x = data.frame( id = c(1, 1, 2, 2), blue = c(1, 0, 1, 0), red = c(0, 1, 0, 1) ) # collapse the data frame melt(data = x, id.vars = "id", measure.vars = c("blue", "red"))

jestonblu@gmail.com at Oct 19, 2017 reshape2 v1.4.2

##### Melt Example ```r library(reshape2) # example data frame x = data.frame( id = c(1, 1, 2, 2), blue = c(1, 0, 1, 0), red = c(0, 1, 0, 1) ) # collapse the data frame melt(data = x, id.vars = "id", measure.vars = c("blue", "red")) ```