14.03.2014 Views

Using JMP - SAS

Using JMP - SAS

Using JMP - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

196 Reshape Data Chapter 6<br />

Join Data Tables<br />

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

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

Because both tables have one column (name) that contains the same values, you need to tell <strong>JMP</strong> that<br />

they are matches. <strong>JMP</strong> then examines each of the values in the name column of the first table to<br />

determine whether there was a corresponding value in the second table’s name column. For example, it<br />

detects that Alice is located in both tables. It creates a name column in the new table with Alice as a<br />

value. It then takes the age and sex of Alice from table one and puts it in the new table. Then it takes the<br />

height and weight of Alice and puts them in the new table.<br />

4. Select By Matching Columns in the Matching Specification area.<br />

5. From the Students1 and Students2 lists, select name.<br />

6. Click Match.<br />

7. You want the new table to contain only one row for each name, so check the Drop multiples boxes for<br />

both tables.<br />

8. Click OK.<br />

Figure 6.29 Joined Table<br />

To join tables with different numbers of rows and different column names:<br />

Suppose that Sarah and Joe are performing a popcorn experiment. They are popping different types of<br />

popcorn (gourmet and plain) in different amounts of oil. They are recording the amount (yield) of popcorn<br />

that is produced. Sarah gave you the first trial data in a file named Trial1.jmp. Joe gave you the second trial<br />

data in a file named Little.jmp. You want to combine the two tables into one table.<br />

1. Open the Trial1.jmp and Little.jmp sample data tables.<br />

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

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

You can see that three of the columns (popcorn, oil amt/oil, and batch) contain the same values in both<br />

tables. Identify these columns as matches. Also, because Sarah and Joe gave the oil and oil amt columns<br />

different names, you can tell <strong>JMP</strong> that oil amt and oil match.<br />

4. Select By Matching Columns in the Matching Specification area.

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

Saved successfully!

Ooh no, something went wrong!