[R] promise already under evaluation

Sam Steingold sds at gnu.org
Wed Jul 3 19:12:58 CEST 2013


> * Sam Steingold <fqf at tah.bet> [2013-07-03 11:33:47 -0400]:
>
> Hi, I asked this question on SO but got no answers:
> http://stackoverflow.com/questions/17310825/r-promise-already-under-evaluation

Backlin explained on SO that the errors are to be expected: "..." is a
formal argument which was not supplied and "expr" and "x" were actually
being evaluated at the time of get() call.

The bottom line is that I must catch and ignore errors.

The remaining problem is: how do I pass the same arguments down?

e.g.,

--8<---------------cut here---------------start------------->8---
f <- function (... verbose=FALSE ...) { ... }
g <- function (... verbose=FALSE ...) { ... f(... verbose=verbose ...) ... }
--8<---------------cut here---------------end--------------->8---

results in "promise already under evaluation" (and, yes, I do understand
why).

is there anything better than

--8<---------------cut here---------------start------------->8---
f <- function ( ... f.verbose=FALSE ... ) { ... }
g <- function ( ... g.verbose=FALSE ... ) { ... f(... f.verbose=g.verbose ...) ... }
--8<---------------cut here---------------end--------------->8---


-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 13.04 (raring) X 11.0.11303000
http://www.childpsy.net/ http://www.memritv.org http://mideasttruth.com
http://honestreporting.com http://think-israel.org http://jihadwatch.org
Incorrect time synchronization.



More information about the R-help mailing list