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

recast-ar

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.

Author(s)

Hadley Wickham <h.wickham@gmail.com>

See Also

Examples

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

reshape

Flexibly Reshape Data

v0.8.8
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre]
Initial release

We don't support your browser anymore

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