The Merge Tables menu option will merge multiple tables, based on row names and column names. That is, if the tables share row IDs, then the data will be matched by rowID and merged as new columns; if the tables share column IDs, the table data will be matched by column ID and merged as new rows. If the row IDs and column IDs match, then only the last table's data will be used.
Missing data will be inserted if not all row names and column names match. It can be accessed by going to: Table | Merge.
Input Data Requirements
This command works on all Table objects, except for Design Tables and Annotation Tables, which have fixed rows.
Step 1: Select the tables to merge
The "Merge Tables" window allows the user to select Tables to merge. Users can pick any number of tables to merge by clicking on the + button.
- The order of columns and rows in the new Table can be adjusted using the up and down arrows.
Step 2: Define the merge options
The options defined in this step determines how these tables will be merged.
- make unique row names - by selecting this option, rows with the same name will not be merged, but named with rowname1, rowname2
- make unique column names - by selecting this option, columns with the same name will not be merged, but named with columnname1, columnname2
- Append to the first data table - when checked, will not create a new Table object, but instead add everything to whichever Table is listed first in the Listed data section.
- Create source column - when checked, will create a source column in the Table indicating which dataset each row originated from.
- Output table name - allows the user to name the newly created Table object.
Missing data will be inserted when not all row names and column names match.
A new table will be created in the Solution Explorer, merging the tables as defined in Step 2. Please refer to Example Usage for specific case.
In the example below, there are 3 tables:
Merging table 1 and 2 (which have the same column names) will produce the following table:
Merging table 2 and 3 (which have different column names but the same row names) will produce the following table.
Merging table 1 and 3 (which have different column names but the same row ID's) will produce the following table.