You can create a new data table from the active table by splitting one column into several new columns. This column is split according to the values found in another column, referred to as the Split By column. You can also split columns according to the values of one or more grouping variables.
1.
|
Select Tables > Split.
|
4.
|
Click Split By.
|
5.
|
6.
|
Click Split.
|
To include only columns used in the split in the new table, click the Drop All option in the Remaining Columns area.
|
|
To select which columns to keep in the new table, click the Select option in the Remaining Columns area. Then select which columns to keep in the new table.
|
|
Specify a Group variable when you want your data to be split within each group of the selected variable. Each group results in a row in the output table.
If your grouping variable contains unequal groups, or if your grouping variable is not grouped in order (is random), then you must specify a Group variable. The Group variable ensures that your data is restructured properly.
|
|
This section contains two examples using the Split command:
•
|
In the Popcorn.jmp data table, the data in the trial column shows that there are two trials, 1 and 2. In this example, split the yield column into two new columns: one for trial 1 and one for trial 2. Proceed as follows:
1.
|
Open the Popcorn.jmp sample data table.
|
2.
|
Select Tables > Split.
|
3.
|
4.
|
5.
|
The default is Drop All, which omits any columns that are not in the Split By, Split Columns, or Group fields. Selecting Keep All includes these columns in the new table.
6.
|
7.
|
Click OK.
|
A new data table is created. See New Table Created by Splitting yield Column by trial Column. Notice the following:
‒
|
‒
|
The data table has two new columns, named after the unique values (1 and 2) from the original trial column.
|
‒
|
‒
|
8.
|
(Optional) Rename the new columns to give them meaningful names. For example, rename 1 to yield (trial 1) and rename 2 to yield (trial 2).
|
The Drug Measurements.jmp sample data table contains measurements of three different drugs (a, b, and c) administered to 12 different subjects. You want to split the measurement into different columns, one for each drug type. You also want to group the measurements by subject.
1.
|
Open the Drug Measurements.jmp sample data table.
|
2.
|
Select Tables > Split.
|
3.
|
4.
|
Notice that the Subject variable contains unequal groups. Most of the subjects were given all three drugs, but subject 2 was given only one drug, and subjects 7 and 12 were given only two drugs. In this situation, to ensure that the correct measurements are associated with the correct subject, specify Subject as the Group variable.
5.
|
6.
|
Click OK.
|
Drug Measurements.jmp Split by a Grouping Variable