From c15f6e5b573c27dc434b8ad934431ed489347583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mine=20=C3=87etinkaya-Rundel?= Date: Wed, 14 Apr 2021 16:50:55 +0100 Subject: [PATCH] Grammar suggestions from @zhaoy --- iteration.Rmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iteration.Rmd b/iteration.Rmd index 9ad1f3f..dbdd2f2 100644 --- a/iteration.Rmd +++ b/iteration.Rmd @@ -94,7 +94,7 @@ Every for loop has three components: That's all there is to the for loop! Now is a good time to practice creating some basic (and not so basic) for loops using the exercises below. -Then we'll move on some variations of the for loop that help you solve other problems that will crop up in practice. +Then we'll move on to some variations of the for loop that help you solve other problems that will crop up in practice. ### Exercises @@ -285,7 +285,7 @@ This is common when doing simulations. For example, you might want to loop until you get three heads in a row. You can't do that sort of iteration with the for loop. Instead, you can use a while loop. -A while loop is simpler than for loop because it only has two components, a condition and a body: +A while loop is simpler than a for loop because it only has two components, a condition and a body: ```{r, eval = FALSE} while (condition) { @@ -724,7 +724,7 @@ Purrr provides two other useful adverbs: ## Mapping over multiple arguments So far we've mapped along a single input. -But often you have multiple related inputs that you need iterate along in parallel. +But often you have multiple related inputs that you need to iterate along in parallel. That's the job of the `map2()` and `pmap()` functions. For example, imagine you want to simulate some random normals with different means. You know how to do that with `map()`: