A while back, Simon Urbanek from the R core team (I believe) chastised me for advising a user to use return directly at the end of a function (his comment was later removed):
The formula foo = function() + return(value)
Rather, he suggested:
value = function() + foo
Probably, in this circumstance, it is necessary to:
"foo" = "function()"; "if(a)" "return(a)" "otherwise" "return(b)"
His reply clarified the benefits of not calling return unless absolutely necessary, but it was taken down.
Why doesn't calling return sooner or better, and hence be preferred?