melt_ | R Documentation |
Inspired by reshape2:::melt
, we melt data.frame
s and
matrix
s. This function is built for speed.
melt_(data, ...)
## S3 method for class 'data.frame'
melt_(
data,
id.vars,
measure.vars,
variable.name = "variable",
...,
value.name = "value"
)
## S3 method for class 'matrix'
melt_(data, ...)
data |
The |
... |
Arguments passed to other methods. |
id.vars |
Vector of id variables. Can be integer (variable position)
or string (variable name). If blank, we use all variables not in |
measure.vars |
Vector of measured variables. Can be integer (variable position)
or string (variable name). If blank, we use all variables not in |
variable.name |
Name of variable used to store measured variable names. |
value.name |
Name of variable used to store values. |
If items to be stacked are not of the same internal type, they will be
promoted in the order logical
> integer
> numeric
>
character
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.