By Alex


2012-09-11 20:22:00 8 Comments

I am attempting to understand why development had shifted from reshape to reshape2 package. They seem to be functionally the same, however, I am unable to upgrade to reshape2 currently due to an older version of R running on the server. I am concerned about the possibility of a major bug that would have shifted development to a whole new package instead of simply continuing development of reshape. Does anyone know if there is a major flaw in the reshape package?

1 comments

@Matt Parker 2012-09-11 22:50:34

reshape2 let Hadley make a rebooted reshape that was way, way faster, while avoiding busting up people's dependencies and habits.

https://stat.ethz.ch/pipermail/r-packages/2010/001169.html

Reshape2 is a reboot of the reshape package. It's been over five years since the first release of the package, and in that time I've learned a tremendous amount about R programming, and how to work with data in R. Reshape2 uses that knowledge to make a new package for reshaping data that is much more focussed and much much faster.

This version improves speed at the cost of functionality, so I have renamed it to reshape2 to avoid causing problems for existing users. Based on user feedback I may reintroduce some of these features.

What's new in reshape2:

  • considerably faster and more memory efficient thanks to a much better underlying algorithm that uses the power and speed of subsetting to the fullest extent, in most cases only making a single copy of the data.

  • cast is replaced by two functions depending on the output type: dcast produces data frames, and acast produces matrices/arrays.

  • multidimensional margins are now possible: grand_row and grand_col have been dropped: now the name of the margin refers to the variable that has its value set to (all).

  • some features have been removed such as the | cast operator, and the ability to return multiple values from an aggregation function. I'm reasonably sure both these operations are better performed by plyr.

  • a new cast syntax which allows you to reshape based on functions
    of variables (based on the same underlying syntax as plyr):

  • better development practices like namespaces and tests.

@isomorphismes 2014-09-07 21:10:29

Thanks Matt! Appreciate you posting this from the mail list to the more publicly familiar forum here.

@landroni 2015-10-15 16:45:49

the ability to return multiple values from an aggregation function See related question: stackoverflow.com/questions/21477040/…

Related Questions

Sponsored Content

11 Answered Questions

[SOLVED] How to reshape data from long to wide format

  • 2011-05-04 22:27:50
  • Steve
  • 182540 View
  • 241 Score
  • 11 Answer
  • Tags:   r reshape r-faq

1 Answered Questions

[SOLVED] Reshape dataframe in R with library reshape2 or similar

1 Answered Questions

[SOLVED] reshape from base vs dcast from reshape2 with missing values

3 Answered Questions

[SOLVED] How to properly document S4 class slots using Roxygen2?

1 Answered Questions

[SOLVED] Reshape data with separator using reshape2

  • 2016-02-07 05:19:01
  • richard_jokes
  • 335 View
  • 1 Score
  • 1 Answer
  • Tags:   r reshape2

1 Answered Questions

[SOLVED] Reshaping data with reshape2 in R

0 Answered Questions

Translate R reshape into dcast

  • 2014-09-19 09:03:49
  • striatum
  • 71 View
  • 0 Score
  • 0 Answer
  • Tags:   r reshape reshape2

1 Answered Questions

[SOLVED] Can't install package reshape2 for R 2.15.3 on Ubuntu 12.04.4

2 Answered Questions

[SOLVED] Reshape a dataframe with reshape2

  • 2014-01-12 20:12:42
  • luciano
  • 195 View
  • 0 Score
  • 2 Answer
  • Tags:   r reshape2

2 Answered Questions

[SOLVED] simple reshape in R using reshape2 causes error

Sponsored Content