This article describes how to merge files by case.
In this example, two files census_05_men and census_05_women.sav were merged. Variables with the black box in the first column came from the demographics file and those on the second column from the attitudes files. Both files have a common variable called ID.
Requirements
- A professional user license
- Files to be merged must be stored on the Displayr Cloud Drive
- Files to be merged must be .sav files
Method
File name specification
- Select Anything > Data > Data Set > Combine > by Case.
- In Inputs > Data sets, type the name of the first file stored on the Cloud Drive in the Data set 1 box.
- In Inputs > Data sets, type the name of the second file stored on the Cloud Drive in the Data set 2 box.
- Type the name of the merged data set in the Combined data set name box. By default, it will be called Combined data set.sav.
For example:
AUTOMATIC VARIABLE MATCHING
By default, the procedure uses Automatic Variable Matching.
If you want more control over the matching process, uncheck Automatically determine what to match and choose from the following list of options:
VARIABLES
Specify the names of the variables that should or should not be combined. Also, the variables that should be manually included or omitted from the combined data set.
NAMES AND LABELS
When the labels or names for matching variables are not identical, you can either use the ones from the first data set or the last data set. Also, if there are multiple labels for the same value, you can either use the ones from the preferred data set or create new ones.
AUTOMATIC UPDATING
Use Automatic updating if you want the merge to refresh automatically after a specified time period.
Tips
- Displayr will always add a categorical variable to the file called mergesrc which identifies the source file for each record.
- If possible, it is generally preferable to obtain a single data file that has already been merged than to merge data files yourself. This is because:
- It can be difficult to manually construct a Date variable.
- It can be difficult when questionnaires have changed between waves.
- It requires the person doing it to have a good understanding of data (as ill-considered decisions can have large ramifications).
Next Steps:
Once the merge has been performed and is successful, the new merged file is automatically saved to the Cloud Drive using the combined data set name given at Step 4:
You can now update your existing data set with the merged file by:
- Select the original data set that you would like to update with the merged file in the Data Sets tree.
- From the object inspector, click Update.
- Select Displayr Cloud Drive.
- Select the merged data set from the list of files and click OK.
- A Data Difference Warning may appear alerting you of any changes to the data set. Review these results and click Accept or Remind Me Later.
- The data set and outputs that you created will be updated with data from the combined data set.
Next
How to Merge Files by Variable (Add New Variables)
How to Use the Displayr Cloud Drive
Multiple Data Sets Video Guide