similar to: Detecting user interrupts in R_tryEval

Displaying 20 results from an estimated 2000 matches similar to: "Detecting user interrupts in R_tryEval"

2007 Apr 06
2
wishlist: additional argument in R_tryEval (Rinternals.h)
Hi, 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
2014 May 02
1
backtrace while trying to clear workspace
Hi , I tried to do the following . Before I execute the R script , i tried to clear the work space using rm(list = ls(all = TRUE)); . I get the following back trace . Its a huge backtrace , attached a part of it . Can anyone help why I get this ? #13 0x00002aaaaafd612f in Rf_eval (e=0x1448d68, rho=0x16c6780) at eval.c:399 #14 0x00002aaaaafdabf6 in Rf_applyClosure (call=0x1447108, op=0x1448f60,
2009 Jun 16
1
calling handlers within R_tryEval
Hello, When using R_tryEval (from JRI in my case), is there a way to setup error recovery strategy and more generally calling handlers. From my reading of context.c, R_tryEval calls R_ToplevelExec which creates a context like this: begincontext(&thiscontext, CTXT_TOPLEVEL, R_NilValue, R_GlobalEnv, R_BaseEnv, R_NilValue, R_NilValue); so I guess what I am trying to do is add
2009 Jan 08
1
Callbacks seems to get GCed.
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 following sample. Sorry if it is a little verbose. The first couple of call of calls still work, but at some point one of the callbacks (callback1 in my
2009 Aug 25
2
Clarifications please.
Hi I think I have asked these questions earlier, but I been able to find answers from the documentation (which I found poorly written in several places). Will someone be kind enough to give me answers and enlighten me? (as in explain with CODE?) I want to embed R in my application and use the fPortfolio package for carrying out risk management computations. Right now I'm reading the Rmetrics
2009 Sep 16
2
I want to get a reference to this time series object
I'm trying to get a reference to this object in C SWX.RET[1:6,c("SBI,"SPI","SII")] While i am able to access and use a plain SWX.RET object, I'm getting confused on how to create an object with the array subscripts like above. Here is what I tried to do. It doesn't work because "[" is obviously not an operation or function on SWX.RET. So how do I
2009 Sep 29
3
How do I access class slots from C?
Hi I'm trying to implement something similar to the following R snippet using C. I seem to have hit the wall on accessing class slots using C. library(fPortfolio) lppData <- 100 * LPP2005.RET[, 1:6] ewSpec <- portfolioSpec() nAssets <- ncol(lppData) setWeights(ewSpec) <- rep(1/nAssets, times = nAssets) ewPortfolio <- feasiblePortfolio( data = lppData, spec = ewSpec,
2019 Apr 05
2
Parsing code with newlines
Hello! This is my first post here. I came across the very same problem. It can be reproduced within modified tests/Embedding/RParseEval.c Actually this example has another issue, namely it doesn't wrap everything in R_ToplevelExec . This is a major show stopper for newcomers as that function is barely mentioned anywhere and longjmp into terminated setuploop function followed by R_suicide
2012 Apr 18
1
C - R integration: Memory Issues
Hi all, I am a PhD student and I am working on a C project that involves some statistical calculations. So, I tried to embed R into C, in order to call R functions from a C program. My program seems to get the correct results from R. However, it appears to have a lot of memory allocation issues, in contrast to the small amounts of memory that my code allocates. Some additional info
2004 Aug 18
3
R as shared library
Hello folks, I'm embarking on a project to embed R into the Apache web server, and I'd like your help. Currently, I'm looking for a way for R code to call back into a shared library from which the R shared library was loaded. Essentially, apache starts and loads mod_R.so which runs an initialization routine which calls Rf_initEmbeddedR() and the following code: /* override to
2011 Jan 26
2
Dealing with R list objects in C/C++
Hi, I'd like to construct an R list object in C++, fill it with relevant data, and pass it to an R function which will return a different list object back. I have browsed through all the R manuals, and examples under tests/Embedding, but can't figure out the correct way. Below is my code snippet: #include <Rinternals.h> // Rf_initEmbeddedR and other setups already performed
2004 Oct 08
2
R-2.0.0 findVar and findFun question
Dear all, when working on a project with embedded R, I found out that R-2.0.0 causes a problem where older versions worked OK. Rf_findVar(...) causes the following error when used to find a generic function (such as print): fun = Rf_findVar(...); R_tryEval(fun, ...); Error in function (object, ...) : Invalid generic function in usemethod Alternatively, using Rf_findFun(...) seems OK in this
2009 Nov 14
1
R_tryEval for OCaml-R.
Hello. I'm currently working on the OCaml-R binding allowing to call R code from Objective Caml. As Objective Caml is a functional language, I'd like the binding to be as 'functional' as possible. Specifically, this means that I'd like using the R_tryEval function and all related entry points in libR.so. I've had a look at R-exts.pdf, but R_tryEval is not documented.
2007 Feb 22
1
R_tryEval not properly documented in 'Writing R Extensions' (PR#9524)
Full_Name: Byron Ellis Version: 2.4.1 OS: N/A Submission from: (NULL) (75.55.126.10) R_tryEval is implied to be in the public API by 'Embedding R in Other Applications,' but not documented in 'Writing R Extensions.' This would seem to be an oversight given the dependence of many applications including but not limited to the official OS X GUI on this function.
2013 Mar 06
1
Printing warning messages around R_tryEval
Hi! In RKWard we use R_tryEval() at a number places to run R commands. In order to make sure that any generated warnings become visible close to the problem, we were following up (most of) these calls with Rf_PrintWarnings(). Rf_PrintWarnings() was never available in the headers (as far as I know), and in r61771 the symbol has been hidden from libR.so. So this solution is no longer
2009 Aug 25
1
R command line behaving funny
Hi I am unable to try out examples from the Rmetrics Ebook from the R command prompt. Below is an example of what happens: > Covariance<-cov(SWX.RET) Error in cov.timeSeries(SWX.RET) : no slot of name "Data" for this object of class "timeSeries" I have loaded Rmetrics and fPortfolio using the library function but still I get these errors. However, if I embed the R
2008 Aug 06
1
RGtk2 on linux: "stack smashing detected"
Yea I am aware of this. This is because the Ubuntu binary has stack smashing detection enabled. It's possible to build R without this checking: export CFLAGS="-fno-stack-protector" I have not been able to figure out why stack smashing is detected. I'm cc'ing this to r-devel in case anyone else has an idea. Michael On Wed, Aug 6, 2008 at 12:31 AM, Felix Andrews
2019 Apr 10
1
Parsing code with newlines
On Wed, Apr 10, 2019 at 5:06 AM, Tomas Kalibera <tomas.kalibera at gmail.com> wrote: >> This is my first post here. I came across the very same problem. >> It can be reproduced within modified tests/Embedding/RParseEval.c > > Please check https://www.r-project.org/posting-guide.html and update > your post if you still need to get help here - from your current post >
2007 Feb 22
0
R_tryEval not properly documented in 'Writing R Extensions' (PR#9525)
On Thu, 22 Feb 2007, ellis at stat.harvard.edu wrote: > Full_Name: Byron Ellis > Version: 2.4.1 > OS: N/A > Submission from: (NULL) (75.55.126.10) > > > R_tryEval is implied to be in the public API by 'Embedding R in Other > Applications,' but not documented in 'Writing R Extensions.' This would seem to > be an oversight given the dependence of many
2006 Oct 12
3
multithreading calling from the rpy Python package
Hello, I don't know if this question ought to go here, or rather on R-devel, so please bear with me. I'm interfacing to R via RPy (rpy.sf.net) and an embedded Python interpreter. This is really quite convenient. I use this approach to calculate the correlation coefficient of 1 independent dataset (vector) with 4 dependent vectors. It'd be nice if that could be done in 4 parallel