parent
1913474b52
commit
947a5da3c1
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue