similar to: R_tryEval for OCaml-R.

Displaying 20 results from an estimated 300 matches similar to: "R_tryEval for OCaml-R."

2007 Feb 21
3
non-interactive R_tryEval does not return
...at least I think that is what happens, at least on some configurations. Here's a repeatable example: cd R_HOME/tests/Embedding touch tmp.R make tryEval and then (correct) > ./tryEval --slave Error in sqrt("") : Non-numeric argument to mathematical function Caught an error calling sqrt(). Try again with a different argument. [1] 3 versus (non-interactive; no return) >
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
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
2007 Jul 04
2
problem with findFun call from embedded R
I was debugging a problem reported to me regarding PL/R, and found that I can duplicate it using only R sources. It might be characterized as possibly a misuse of the findFun() function, but I leave that for the R devel experts to decide. The below results are all with R-2.5.1 (I can't seem to download r-patched at the moment, but didn't see anything in the 2.5.1-patched release
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
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
2016 Jul 07
1
Detecting user interrupts in R_tryEval
Is there any way to distinguish between an error and a user interruption in R_tryEval? In both cases the ErrorOccurred argument is set to 1. For my application I need a different action in case of a SIGINT. >From the source code I infer that R_tryEval basically wraps eval in R_ToplevelExec, which returns TRUE if fun returns normally, FALSE if it results in a jump to top level. However both an
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.
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
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
2010 Jan 07
1
Segfault in GetNewPage, memory.c.
Hello. I'm still working on my OCaml-R binding and I get a segfault in the GetNewPage() function of memory.c. For the record, the OCaml-R binding seems to work fine with OCaml bytecode. The segfault here is the main issue I have with OCaml native code. OCaml-R can be found on the following links. Source code: http://yziquel.homelinux.org/gitweb/?p=ocaml-r.git;a=summary
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
2009 Nov 28
2
[Fwd: opened symbols in libR.so available.]
Hi. I've patched Dirk Eddelbuettel's Debian package of R, namely r-base, in order to make hidden symbols of the library libR.so available is now available: http://yziquel.homelinux.org/debian/pool/main/r/r-base/ For instance, the mkPROMISE symbol is available: > yziquel at seldon:/usr/lib/R/lib$ nm -D libR.so | grep mkPROMISE > 000000000011f6f0 T Rf_mkPROMISE > yziquel at
2010 Jan 28
1
Problem with R math library.
Hello. I've been working on my OCaml-R binding, and I quite pleased to see that it is functional, though far from being perfect or polished. You can find the gitweb webpage and the interface documentation at http://yziquel.homelinux.org/gitweb/?p=ocaml-r.git;a=tree http://yziquel.homelinux.org/topos/api/ocaml-r/index.html I'm having unexpected trouble with the math library, though.
2009 Nov 16
0
OCaml-R and xts works!
Hi. I've managed to make a *very* simple wrapper around the xts library for R into OCaml. (Need to be downloaded from CRAN for OCaml users, but I expect other wrapping to be fairly similar...). The good, good, good thing (from my humble point of view) is that all loading is done statically: Loading the R interpreter is done statically. Loading the xts library is done statically... etc...
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,
2009 Sep 03
1
Originate calls with AMI.
Hello. I've been trying to use the AMI to originate phone calls. I'm trying to call the SIP phone 'zoiper' with the SIP phone 'yziquel'. So, the AMI interaction is: > Action: originate > Channel: SIP/zoiper > Exten: yziquel > Priority: 1 > Timeout: 30 > Context: internal > > Response: Error > Message: Originate failed > > Event:
2023 Apr 26
1
Warnings created during R_eval or R_tryEval not shown before R ending or R error.
? Sun, 23 Apr 2023 13:33:16 -0400 Laurent Gautier <lgautier at gmail.com> ?????: > When tracing what happens during an error I found that > verrorcall_dflt() in src/main/errors.c calls PrintWarnings(). That > function is not part of R's C-API though. I've tried reading the source code and came to a similar conclusion. PrintWarnings() is required for warnings() to work
2009 Nov 14
1
Silently loading an R package.
Hello. I've been working an a binding between OCaml and R (i.e. calling R from OCaml, mostly). See below for a taste of it. I'm currently wondering how to load a given R package silently. I tried require(xts, quietly = TRUE) but I still get some ugly output. Is it possible to squeeze off this output on stdout? All the best, Guillaume Yziquel. > yziquel at seldon:~$
2008 Apr 29
2
Calling R from C - part way there but need a push!
Dear All, I've read the manual on "Writing R Extensions" and in particular the part on calling R from C. (Most of the manual is about calling C from R, not the other way around.) The good news is that I can now call _some_ R from C, specifically the R functions which have C header files. However it isn't clear to me how to call R functions that are written in R. I