search for: uneval_after_return

Displaying 6 results from an estimated 6 matches for "uneval_after_return".

2020 Nov 20
2
return (x+1) * 1000
...are already R CMD CHECK checks for this kind of thing (I wasnt sure but I'm hearing from others there may be/are) that may be (and/or may need to be) sufficient. ~G On Fri, Nov 20, 2020 at 3:27 PM D?nes T?th <toth.denes at kogentum.hu> wrote: > Or even more illustratively: > > uneval_after_return <- function(x) { > return(x) * stop("Not evaluated") > } > uneval_after_return(1) > # [1] 1 > > On 11/20/20 10:12 PM, Mateo Obreg?n wrote: > > Dear r-developers- > > > > After many years of using and coding in R and other languages, I came > ac...
2020 Nov 20
2
return (x+1) * 1000
...gt; > (and/or may need to be) sufficient. > > > > ~G > > > > On Fri, Nov 20, 2020 at 3:27 PM D?nes T?th <toth.denes at kogentum.hu > > <mailto:toth.denes at kogentum.hu>> wrote: > > > > Or even more illustratively: > > > > uneval_after_return <- function(x) { > > return(x) * stop("Not evaluated") > > } > > uneval_after_return(1) > > # [1] 1 > > > > On 11/20/20 10:12 PM, Mateo Obreg?n wrote: > > > Dear r-developers- > > > > > &...
2020 Nov 21
1
return (x+1) * 1000
...;>>> ~G >>>> >>>> On Fri, Nov 20, 2020 at 3:27 PM D?nes T?th <toth.denes at kogentum.hu >>>> <mailto:toth.denes at kogentum.hu>> wrote: >>>> >>>> Or even more illustratively: >>>> >>>> uneval_after_return <- function(x) { >>>> return(x) * stop("Not evaluated") >>>> } >>>> uneval_after_return(1) >>>> # [1] 1 >>>> >>>> On 11/20/20 10:12 PM, Mateo Obreg?n wrote: >>>> >...
2020 Nov 20
5
return (x+1) * 1000
Dear r-developers- After many years of using and coding in R and other languages, I came across something that I think should be flagged by the parser: bug <- function (x) { return (x + 1) * 1000 } > bug(1) [1] 2 The return() call is not like any other function call that returns a value to the point where it was called from. I think this should straightforwardly be handled in the
2020 Nov 20
0
return (x+1) * 1000
...from others there may be/are) that may be > (and/or may need to be) sufficient. > > ~G > > On Fri, Nov 20, 2020 at 3:27 PM D?nes T?th <toth.denes at kogentum.hu > <mailto:toth.denes at kogentum.hu>> wrote: > > Or even more illustratively: > > uneval_after_return <- function(x) { > ? ?return(x) * stop("Not evaluated") > } > uneval_after_return(1) > # [1] 1 > > On 11/20/20 10:12 PM, Mateo Obreg?n wrote: > > Dear r-developers- > > > > After many years of using and coding in...
2020 Nov 21
0
return (x+1) * 1000
...> > > > > > ~G > > > > > > On Fri, Nov 20, 2020 at 3:27 PM D?nes T?th <toth.denes at kogentum.hu > > > <mailto:toth.denes at kogentum.hu>> wrote: > > > > > > Or even more illustratively: > > > > > > uneval_after_return <- function(x) { > > > return(x) * stop("Not evaluated") > > > } > > > uneval_after_return(1) > > > # [1] 1 > > > > > > On 11/20/20 10:12 PM, Mateo Obreg?n wrote: > > > > Dear r-developers- &...