Reshaping and Aggregating Data: an Introduction to Reshape Package.

Zhongheng Zhang
DOI: https://doi.org/10.3978/j.issn.2305-5839.2016.01.33
2016-01-01
Abstract:It is common that data format extracted from clinical database does not meet the purpose of statistical analysis. In clinical research, variables are frequently measured repeatedly over the follow-up period. Such data can be displayed either in wide or long format. Transformation between these 2 forms can be challenging by hand. Fortunately, there are sophisticated packages in R environment. Data frame should firstly be melted and then casted to format that you want. Aggregation over unique combination of id variables is also allowable. Additionally, the article also introduces 2 functions colsplit() and funstofun() that can be useful in some circumstances.
What problem does this paper attempt to address?