reshape (version 0.8.7)

recast: Recast

Description

melt and cast data 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 one step.

See Also

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

Examples

Run this code
# NOT RUN {
recast(french_fries, time ~ variable, id.var=1:4)
# }

Run the code above in your browser using DataCamp Workspace