[Rd] wishlist: additional argument in R_tryEval (Rinternals.h)

Deepayan Sarkar deepayan.sarkar at gmail.com
Sat Apr 7 00:00:49 CEST 2007


R_tryEval, exported in Rinternals.h but not part of the API, is
currently defined as:

R_tryEval(SEXP e, SEXP env, int *ErrorOccurred);

I'm trying to embed R in an application (basically yet another GUI),
and this has been very helpful to catch errors. It would be even more
helpful if it also gave access to the visibility flag. I can wrap this
in a call to withVisible, and that works great, but if there is an
error, traceback() contains a bunch of irrelevant levels.

It seems fairly easy to add another argument, similar to
ErrorOccurred, that is set to the visibility flag before returning. Is
this something that could be considered for addition in R-devel? A
possible patch for R/trunk is attached. Mac-GUI/REngine/REngine.m will
also need a patch, but I don't understand the language it's written

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tryEval-patch.diff
Type: text/x-patch
Size: 5296 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-devel/attachments/20070406/e5e19008/attachment.bin 

More information about the R-devel mailing list