This the generic melt function. See the following functions for the details about different data structures:
melt(data, ..., na.rm = FALSE, value.name = "value")
melt.data.frame
for data.frames
melt.array
for arrays, matrices and tables
melt.list
for lists