November 2007, Volume 21, Issue 12 | Hadley Wickham
The reshape package for R provides a common framework for data reshaping and aggregation. It uses the 'melting' and 'casting' paradigm, where data is 'melted' into a form distinguishing measured and identifying variables, and then 'cast' into a new shape. The paper introduces the conceptual framework, practical advice for melting and casting, and a case study. Data reshaping involves rearranging the form of data without changing its content. The reshape package includes functions for melting and casting, which allow data to be transformed into various formats, including data frames, lists, and high-dimensional arrays. The package also includes functions for aggregation, summarizing data, and handling missing values. The paper discusses the use of the reshape package in a real-life example involving French fries data, where the data was melted and then cast into different formats for analysis. The package provides tools for data manipulation, including functions for handling factors, data frames, and other data structures. The paper concludes with a case study demonstrating the use of the reshape package in analyzing sensory data from a French fries experiment.The reshape package for R provides a common framework for data reshaping and aggregation. It uses the 'melting' and 'casting' paradigm, where data is 'melted' into a form distinguishing measured and identifying variables, and then 'cast' into a new shape. The paper introduces the conceptual framework, practical advice for melting and casting, and a case study. Data reshaping involves rearranging the form of data without changing its content. The reshape package includes functions for melting and casting, which allow data to be transformed into various formats, including data frames, lists, and high-dimensional arrays. The package also includes functions for aggregation, summarizing data, and handling missing values. The paper discusses the use of the reshape package in a real-life example involving French fries data, where the data was melted and then cast into different formats for analysis. The package provides tools for data manipulation, including functions for handling factors, data frames, and other data structures. The paper concludes with a case study demonstrating the use of the reshape package in analyzing sensory data from a French fries experiment.