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

recast

Recast: melt and cast in a single step


Description

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

Usage

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

Arguments

data

data set to melt

formula

casting formula, see dcast for specifics

...

other arguments passed to dcast

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

See Also

Examples

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

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.