Skip to content
Prev 59146 / 63424 Next

return (x+1) * 1000

On 20/11/2020 5:58 p.m., Mateo Obreg?n wrote:
The problem is that in R, return() is a function.  It's a function that 
does weird things, but it's not a reserved word like it is in some other 
languages.  If you don't like the standard definition, you can change it:

return <- function() 3

f <- function() return()

f()

which will return 3.

Duncan Murdoch