From a182b874bd25aec7b159dd91012e187d09807bd7 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Sun, 4 Oct 2020 16:12:56 -0500 Subject: [PATCH] Fix typo Fixes #876 --- relational-data.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relational-data.Rmd b/relational-data.Rmd index 2c905ec..db70bab 100644 --- a/relational-data.Rmd +++ b/relational-data.Rmd @@ -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: