Learn R Programming

mudata (version 0.1.1)

parallel.melt: Melt multiple sets of columns in parallel

Description

Essentially this is a wrapper around reshape2::melt.data.frame that is able to cbind several melt operations. This is useful when a wide data frame contains uncertainty or flag information in paired columns.

Usage

parallel.melt(x, id.vars, ..., variable.name = "param",
  factorsAsStrings = TRUE)

Arguments

x

A data.frame

id.vars

vector of ID variable names

...

Named arguments specifying the measure.vars to be stored to the column name specified.

variable.name

Column name to use to store variables

factorsAsStrings

Control whether factors are converted to character when melted as measure variables.

Value

A qtag.long object

Examples

Run this code
# NOT RUN {
data(pocmajsum)
parallel.melt(pocmajsum,
              id.vars=c("core", "depth"),
              values=c("Ca", "Ti", "V"),
              err=c("Ca_sd", "Ti_sd", "V_sd"))

# }

Run the code above in your browser using DataLab