diff --git a/iteration.Rmd b/iteration.Rmd index f0cc1b8..2dee106 100644 --- a/iteration.Rmd +++ b/iteration.Rmd @@ -435,7 +435,7 @@ col_sd <- function(df) { } ``` -Uh oh! You've copied-and-pasted this code twice, so it's time to think about how to generalise it. Notice that most of code is for-loop boilerplate and it's hard to see the one thing (`mean()`, `median()`, `sd()`) that is different between the functions. +Uh oh! You've copied-and-pasted this code twice, so it's time to think about how to generalise it. Notice that most of this code is for-loop boilerplate and it's hard to see the one thing (`mean()`, `median()`, `sd()`) that is different between the functions. What would you do if you saw a set of functions like this: