14.03.2014 Views

Using JMP - SAS

Using JMP - SAS

Using JMP - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

194 Reshape Data Chapter 6<br />

Join Data Tables<br />

Examples of a Cartesian Join<br />

When doing a Cartesian join, <strong>JMP</strong> joins two tables in a Cartesian fashion, where a new table is created that<br />

consists of all possible combinations of the rows from two original tables. This creates cases in the output<br />

table where there are one case for each combination of column values.<br />

Simple Example<br />

1. Open the Species1.jmp and Species2.jmp sample data tables.<br />

2. From the Species1.jmp table, select Tables > Join.<br />

3. In the Join...with box, select Species2.<br />

4. From the Matching Specification menu, select Cartesian Join.<br />

5. Click OK.<br />

Figure 6.26 Joining Tables <strong>Using</strong> Cartesian Join<br />

The data in Species1.jmp is crossed with the data in Species2.jmp to produce the joined table, which<br />

shows all combinations of the values in each set.<br />

Complex Example<br />

In this example, use the Tables > Join command twice:<br />

• The first join combines the Oil Amount.jmp table with the Batch.jmp table using the Cartesian option.<br />

• The second join combines the resulting table (Cartesian oil amount + batch) with the Popcorn<br />

Type.jmp table and produces a final table with all tables joined.<br />

1. Open the Oil Amount.jmp, Batch.jmp, and Popcorn Type.jmp sample data tables.<br />

2. From the Oil Amount.jmp table, select Tables > Join.<br />

3. In the Join...with box, select Batch.<br />

4. From the Matching Specification menu, select Cartesian Join.<br />

5. Under Output table name, type Oil Amount and Batch.<br />

6. Click OK.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!