Skip to content

Commit

Permalink
Update functions.Rmd (hadley#293)
Browse files Browse the repository at this point in the history
Small typo
  • Loading branch information
sibusiso16 authored and hadley committed Aug 20, 2016
1 parent 1913474 commit 947a5da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ Figuring out what your function should return is usually straightforward: it's w

### Explicit return statements

The value returned by the function is the usually the last statement it evaluates, but you can choose to return early by using `return()`. I think it's best to save the use of `return()` to signal that you can return early with a simpler solution. A common reason to do this is because the inputs are empty:
The value returned by the function is usually the last statement it evaluates, but you can choose to return early by using `return()`. I think it's best to save the use of `return()` to signal that you can return early with a simpler solution. A common reason to do this is because the inputs are empty:

```{r}
complicated_function <- function(x, y, z) {
Expand Down

0 comments on commit 947a5da

Please sign in to comment.