Update functions.Rmd (#591)

This commit is contained in:
pete 2018-06-20 04:00:13 -04:00 committed by Hadley Wickham
parent fe883cb46a
commit a2f7418c10
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ x <- df$a
(x - min(x, na.rm = TRUE)) / (max(x, na.rm = TRUE) - min(x, na.rm = TRUE))
```
There is some duplication in this code. We're computing the range of the data three times, but it makes sense to do it in one step:
There is some duplication in this code. We're computing the range of the data three times, so it makes sense to do it in one step:
```{r}
rng <- range(x, na.rm = TRUE)