From 19a3e926a9ea2db7a2099fdb8654b2b459565409 Mon Sep 17 00:00:00 2001 From: nate-d-olson Date: Thu, 4 Feb 2016 09:06:34 -0500 Subject: [PATCH] fixed small typos --- transform.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transform.Rmd b/transform.Rmd index 23a7895..85433e7 100644 --- a/transform.Rmd +++ b/transform.Rmd @@ -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.