Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

melt_check

Check that input variables to melt are appropriate.


Description

If id.vars or measure.vars are missing, melt_check will do its best to impute them. If you only supply one of id.vars and measure.vars, melt will assume the remainder of the variables in the data set belong to the other. If you supply neither, melt will assume discrete variables are id variables and all other are measured.

Usage

melt_check(data, id.vars, measure.vars, variable.name, value.name)

Arguments

data

data frame

id.vars

vector of identifying variable names or indexes

measure.vars

vector of Measured variable names or indexes

variable.name

name of variable used to store measured variable names

value.name

name of variable used to store values

Value

a list giving id and measure variables names.


reshape2

Flexibly Reshape Data: A Reboot of the Reshape Package

v1.4.4
MIT + file LICENSE
Authors
Hadley Wickham <h.wickham@gmail.com>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.