Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Multiple Types of Observational Units are Stored in the Same Table

Tidy Data Rule(s) Broken: Each type of observational unit forms a table


Select the "should-be-multiple" table from the left pane.

This table holds course descriptions and professor’s Google Scholar citation statistics. These are 2 observations although they do have the “professor” in common.

DUPLICATE THE TABLE:

  1. In the left pane, right click on the “should-be-multiple” query. Select Duplicate from the drop-down menu
Click for Navigation help

DELETE COLUMNS:

  1. In the original “should-be-multiple” table. Select all the columns that are related to citations (other than the professor). To do so hold CTRL (Windows) or Command (Mac) and click on the headers. If the columns are highlighted, they are selected.

  2. On the Home tab in the Manage Columns section, click Remove Columns

Click for Navigation help

RENAME TABLE:

  1. To differentiate your new table from the other one, name it to identify the observation (eg. “Courses”)
Click for Navigation help

DELETE COLUMNS IN OTHER TABLE:

  1. Switch to the “should-be-multiple (2)” table.
  2. Select all the columns that are related to courses (other than the professor). To do so hold CTRL (Windows) or Command (Mac) and click on the headers. If the columns are highlighted, they are selected.
  3. On the Home tab in the Manage Columns section, click Remove Columns
Click for Navigation help

REMOVE DUPLICATES:

  1. Now you have repeated rows. To delete repeats, right click on the header “Professor” and select Remove Duplicates
Click for Navigation help

RENAME TABLE IN OTHER TABLE:

  1. To differentiate your new table from the other one, name it to identify the observation (eg. “Google Scholar Citations”)

NEXT STEP: Should be in the Same Table