Merge pull request #40 from nate-d-olson/master

fixed small typos
This commit is contained in:
Hadley Wickham 2016-02-11 08:08:23 -06:00
commit 0d9df81990
1 changed files with 2 additions and 2 deletions

View File

@ -236,7 +236,7 @@ filter(flights, !(arr_delay > 120 | dep_delay > 120))
filter(flights, arr_delay <= 120, dep_delay <= 120)
```
Note that R has both `&` and `|` and `&&` and `||`. `&` and `|` are vectorised: you give them two vectors of logical values and they return a vector of logical values. `&&` and `||` are scalar operators: you give them individual `TRUE`s or `FALSE`s. They're used if `if` statements when programming. You'll learn about that later on.
Note that R has both `&` and `|` and `&&` and `||`. `&` and `|` are vectorised: you give them two vectors of logical values and they return a vector of logical values. `&&` and `||` are scalar operators: you give them individual `TRUE`s or `FALSE`s. They're used in `if` statements when programming. You'll learn about that later on.
Sometimes you want to find all rows after the first `TRUE`, or all rows until the first `FALSE`. The cumulative functions `cumany()` and `cumall()` allow you to find these values:
@ -535,7 +535,7 @@ ggplot(flights, aes(dep_sched %% 60)) + geom_histogram(binwidth = 1)
ggplot(flights, aes(air_time - airtime2)) + geom_histogram()
```
1. Currently `dep_time()` and `arr_time()` are convenient to look at, but
1. Currently `dep_time` and `arr_time` are convenient to look at, but
hard to compute with because they're not really continuous numbers.
Convert them to a more convenient representation of number of minutes
since midnight.