Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
ryandewitt
Community Manager Community Manager

How to use JMP Split

 

In this short video I'll show you with 2 examples how to use the Split in JMP.

 

In the first example, one column is split by a second column. 

The second example uses a Group variable. 

 

Split a Column by a second column

 

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. 

I'll first select Help then Sample Data Library and open Popcorn.

Then from the Tables menu select Split.

I'll select the yield column and click Split Columns.

I'll select the trial column and click Split By.

Then Under Remaining columns, select Keep All.

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.

Now I'll Click OK and a new data table is created.

 

Notice the following:

–The yield and trial columns are gone.

–The data table has two new columns, named after the unique values (1 and 2) from the original trial column.

–The values from the original yield column are now split into the new columns named 1 and 2.

–The columns other than trial and yield are exactly the same as they were in the original table.

I suggest you rename the new columns to give them meaningful names. For example, rename 1 to yield (trial 1) and rename 2 to yield (trial 2).

Split a Column: Grouping Rows Example

The Drug Measurements 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.

 

I'll select Help then Sample Data Library and open Drug Measurements.jmp.

From Tables I'll select Split.

 

Then I'll select Drug Type and click Split By.

And now I'll select measurement and click Split Columns.

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.

 

Select Subject and click Group.

Now I'll Click OK.

 

And here is Drug Measurements Split by a Grouping Variable 

 

You can see that the appropriate missing values appear for subjects 2, 7, and 12.

Article Labels
Article Tags
Contributors