Skip to content

Commit

Permalink
Update relational-data.Rmd (hadley#255)
Browse files Browse the repository at this point in the history
Typo
  • Loading branch information
sibusiso16 authored and hadley committed Aug 15, 2016
1 parent 7c9c28c commit 8bc81d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions relational-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 16,7 @@ To work with relational data you need verbs that work with pairs of tables. Ther

* __Set operations__, which treat observations as if they were set elements.

The most common place to find relational data is in a _relational_ database management system (or RDBMS), a term that encompasses almost all modern databases. If you've used a database before, you've almost certainly used SQL. If so, you should find the concepts in this chapter familiar, although their expression in dplyr is a little different. Generally, dplyr is a little easier to use than SQL because dplyr is specialised to data analysis: it makes common data analysis operations easier, at the expense of making it more difficult to do other things that don't commonly need for data analysis.
The most common place to find relational data is in a _relational_ database management system (or RDBMS), a term that encompasses almost all modern databases. If you've used a database before, you've almost certainly used SQL. If so, you should find the concepts in this chapter familiar, although their expression in dplyr is a little different. Generally, dplyr is a little easier to use than SQL because dplyr is specialised to do data analysis: it makes common data analysis operations easier, at the expense of making it more difficult to do other things that don't commonly need for data analysis.

### Prerequisites

Expand Down Expand Up @@ -176,7 176,7 @@ flights2 <- flights %>%
flights2
```

(Remember, when you're in RStudio, you can also use `View()` to avoid this problem).
(Remember, when you're in RStudio, you can also use `View()` to avoid this problem.)

Imagine you want to add the full airline name to the `flights2` data. You can combine the `airlines` and `flights2` data frames with `left_join()`:

Expand All @@ -186,7 186,7 @@ flights2 %>%
left_join(airlines, by = "carrier")
```

The result of joining airlines to flights is an additional variable: `name`. This is why I call this type of join a mutating join. In this case, you could have got to the same place using `mutate()` and R's base subsetting:
The result of joining airlines to flights2 is an additional variable: `name`. This is why I call this type of join a mutating join. In this case, you could have got to the same place using `mutate()` and R's base subsetting:

```{r}
flights2 %>%
Expand Down

0 comments on commit 8bc81d7

Please sign in to comment.