Re: [R] Returning to parent function

2015-03-17 Thread Martin Morgan
On 03/16/2015 05:05 PM, Saptarshi Guha wrote: Example was complicated, but here is a simpler form continueIfTrue <- function(mm=return()){ eval(mm) } telemStats <- function(){ y <- substitute(return()) continueIfTrue(y) print("I would not like this message to be printed") } t

Re: [R] Returning to parent function

2015-03-17 Thread Rolf Turner
On 18/03/15 13:22, Bert Gunter wrote: With all due respect: I don't think much respect is due. Fortune nomination! cheers, Rolf -- Rolf Turner Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 Home phone: +64-9-480-4619 ___

Re: [R] Returning to parent function

2015-03-17 Thread Jeff Newmiller
Perhaps read ?try --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Resear

Re: [R] Returning to parent function

2015-03-17 Thread Bert Gunter
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 relev

Re: [R] Returning to parent function

2015-03-17 Thread Spencer Graves
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?

Re: [R] Returning to parent function

2015-03-17 Thread David Winsemius
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? > telemStats <- function(){ >y <- substitu

Re: [R] Returning to parent function

2015-03-16 Thread Berend Hasselman
> On 16-03-2015, at 23:08, Saptarshi Guha wrote: > > Hello, > > I would like a function X to return to the place that called the > function XParent that called this function X. > > Y calls XParent > Y = function(){ > XParent() > print("hello") > } > > XParent calls X > > XParent = function

Re: [R] Returning to parent function

2015-03-16 Thread Saptarshi Guha
Example was complicated, but here is a simpler form continueIfTrue <- function(mm=return()){ eval(mm) } telemStats <- function(){ y <- substitute(return()) continueIfTrue(y) print("I would not like this message to be printed") } telemStats() Ideally, calling telemStats() should r

Re: [R] Returning to parent function

2015-03-16 Thread David Winsemius
On Mar 16, 2015, at 3:08 PM, Saptarshi Guha wrote: > Hello, > > I would like a function X to return to the place that called the > function XParent that called this function X. > > Y calls XParent > Y = function(){ > XParent() > print("hello") > } > > XParent calls X > > XParent = function(