Related:

Reshape

Reshape is anR package for flexibly restructuring and aggregating data. It is available on all platforms supported by R (Linux, OS X, Windows, ...). The current version is 0.8.

Reshape (hopefully) makes it easy to do what you have been struggling to do with tapply, by, aggregate, xtabs, apply and summarise. It is also useful for getting your data into the correct structure for lattice or ggplot plots.

Along with ggplot, reshape won the 2006 John Chambers Award for Statistical Computing. ggplot provides a new way of making plots in R, based on the grammar of graphics.

How to install

Reshape is available from CRAN so you can install it using the following R command:

What reshape doesn't do

Reshape is not a fully fledged OLAP solution. If you need to deal with very large datasets, or want to do complex aggregations or use functions that process data from multiple levels, you should probably use a full OLAP product.

Get involved

If you've discovered any bugs in the reshape package, or you have thought of a killer new feature, please email me: h.wickham@gmail.com. I'm also always on the look out for interesting data sets that reshape works well (or not so well) on.