Merge Data
This article is part of The Definitive Guide to Importing and Preparing Data.
Merging data may be necessary before you begin your official setup in Crunch. Merging is important in tracking studies as well.
There are two methods of merging data in Crunch: Appending and Joining.
- Appending datafiles adds more rows to create a larger dataset (Add cases)
- Joining datafiles brings in additional new variables (Add variables)
Append is what happens in a tracking study - you append the incoming wave of data to the existing dataset.
One example of when an append is needed in the initial upload phase is when a study has multiple datafiles and you need to bring them together for analysis. For example, in a multi-region study, you may have individual data files for each region. You would first import them individually and then append each region's data in succession to make one large dataset.
In the web app
- You upload each dataset separately and then append each dataset in succession (e.g., Dataset B is appended to Dataset A to make Dataset A larger. Dataset B can then be discarded. Dataset C can then be appended to Dataset A to make it even larger, and so on).
Using R
- See the functions under Multiple Datasets in the Crunch R package documentation.
- Also read this vignette: Fork and Merge a Dataset