diff --git a/functions.Rmd b/functions.Rmd index bfe5e4f..686685d 100644 --- a/functions.Rmd +++ b/functions.Rmd @@ -106,7 +106,7 @@ df$c <- rescale01(df$c) df$d <- rescale01(df$d) ``` -Compared to the original, this code is easier to understand and we've eliminated one class of copy-and-paste errors. There is still quite a bit of duplication since we're doing the same thing to multiple columns. We'll learn how to eliminate that duplication in [iteration], once you've learn more about R's data structures in [data_structures]. +Compared to the original, this code is easier to understand and we've eliminated one class of copy-and-paste errors. There is still quite a bit of duplication since we're doing the same thing to multiple columns. We'll learn how to eliminate that duplication in [iteration], once you've learn more about R's data structures in [data-structures]. Another advantage of functions is that if our requirements change, we only need to make the change in one place. For example, we might discover that some of our variables include infinite values, and `rescale01()` fails: