[R] Returning to parent function

Bert Gunter gunter.berton at gene.com
Wed Mar 18 01:22:46 CET 2015


With all due respect:

I don't think much respect is due. I doubt that the OP has made much of an
effort to learn R and is merely trying to slap on some prior CS class
concepts onto R. Ergo the confusion and nonsensical post.


http://www.jabberwocky.com/carroll/jabber/jabberwocky.html

seems relevant here.

Cheers,

Bert


On Tuesday, March 17, 2015, Spencer Graves <spencer.graves at prodsyse.com>
wrote:

>
>
> On 3/17/2015 10:01 AM, David Winsemius wrote:
>
>> On Mar 16, 2015, at 5:05 PM, Saptarshi Guha wrote:
>>
>>  Example was complicated, but here is a simpler form
>>>
>>> continueIfTrue <- function(mm=return()){
>>>     eval(mm)
>>> }
>>>
>> What are you trying to accomplish by passing `return()` to a formal
>> parameter?
>>
>
>
>       Might returning a logical serve your purpose?  Then you could say
> "if(!continueIfTrue(...))return(...)".  Will this do what you want?
>
>
>       Spencer
>
>>
>>  telemStats <- function(){
>>>     y <- substitute(return())
>>>
>> That last bit of code doesn't make a lot of sense either. The
>> `substitute` function is specifically designed to NOT evaluate the first
>> argument but rather to return an unevaluated call. If you wanted to
>> actually "return" from that function you would assuredly not use `return`
>> within the substitute argument.
>>
>> You need to explain what you want to accomplish  rather than posting
>> failed code.
>>
>>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


-- 

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge is
certainly not wisdom."
Clifford Stoll

	[[alternative HTML version deleted]]



More information about the R-help mailing list