Learn R Programming

reshape2 (version 1.0)

recast: Recast: melt and cast in a single step...

Description

Recast: melt and cast in a single step

Usage

recast(data, formula, ..., id.var, measure.var)

Arguments

data
data set to melt
formula
casting formula, see cast for specifics
...
other arguments passed to cast
id.var
identifying variables. If blank, will use all non measure.var variables
measure.var
measured variables. If blank, will use all non id.var variables

Details

This conveniently wraps melting and casting a data frame into a single step.

See Also

http://had.co.nz/reshape/

Examples

Run this code
recast(french_fries, time ~ variable, id.var = 1:4)

Run the code above in your browser using DataLab