Fixes #876
This commit is contained in:
Hadley Wickham 2020-10-04 16:12:56 -05:00
parent f0215486cc
commit a182b874bd
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ There are two types of keys:
For example, `flights$tailnum` is a foreign key because it appears in the
`flights` table where it matches each flight to a unique plane.
A variable can be both a primary key _and_ a foreign key. For example, `origin` is part of the `weather` primary key, and is also a foreign key for the `airport` table.
A variable can be both a primary key _and_ a foreign key. For example, `origin` is part of the `weather` primary key, and is also a foreign key for the `airports` table.
Once you've identified the primary keys in your tables, it's good practice to verify that they do indeed uniquely identify each observation. One way to do that is to `count()` the primary keys and look for entries where `n` is greater than one: