[Rd] Accessing browser() in an embedded R

2009-02-27 Thread Bernd Schoeller
Dear List, I have embedded an R interpreter into an application. This works very well until now. As a next step, I would like to make the 'browser()' debugging infrastructure available. Currently, I am executing R code running 'try_eval'. My main application blocks until the try_eval termina

Re: [Rd] Callbacks seems to get GCed.

2009-01-08 Thread Bernd Schoeller
rom being garbage collected. D. Bernd Schoeller wrote: Dear list, I am trying to implement a publish-subscribe mechanism in for an embedded R interpreter. But somehow my registered closures seem to get collected by the GC, even though I have protected them. I have reducted my code to the

[Rd] Callbacks seems to get GCed.

2009-01-08 Thread Bernd Schoeller
ction (f) { .Call(\"set_callback1\",f); }"); r_exec("y <- function (f) { .Call(\"set_callback2\",f); }"); r_exec("x(function() { print(\"A\"); })"); r_exec("y(function() { print(\"B\"); })"); for

Re: [Rd] Reset an embedded R.dll

2008-05-15 Thread Bernd Schoeller
On Thu, 15 May 2008 06:04:51 -, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: Last question: Will I need to UNPROTECT_PTR all references held, or will the call to Rf_endEmbeddedR also free protected references? What is a 'reference' here? Right, my question was imprecise. I meant 'SEXP

Re: [Rd] Reset an embedded R.dll

2008-05-14 Thread Bernd Schoeller
On Thu, 15 May 2008 07:15:15 +0200, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: What I would like to know, and I have not yet found an answer in the documentation: is there a way to 'reset' the interpreter to bring it to the state that it was directly after the call of the initialization r

[Rd] Reset an embedded R.dll

2008-05-14 Thread Bernd Schoeller
Dear List, I am learning how to use the R.dll unter Windows to embed an R interpreter into another programming language. What I would like to know, and I have not yet found an answer in the documentation: is there a way to 'reset' the interpreter to bring it to the state that it was direc