search for: eval_r_command

Displaying 5 results from an estimated 5 matches for "eval_r_command".

2004 Apr 06
1
A question about embedded R
Hello everyone, I met a strange problem when I call R expression from C++, here is the details: I edited a function eval_R_command(); double eval_R_command(const char *funcName) { SEXP exp,e; ParseStatus status = PARSE_OK; int i,n; double val; PROTECT(exp=NEW_CHARACTER(1)); SET_STRING_ELT(exp, 0, COPY_TO_USER_STRING(funcName)); PROTECT(e = R_ParseVector(exp, 1, &status)); n = GET_LENGT...
2008 Aug 30
0
R embedded reinitialization error (PR#12644)
...when I try to reinitialize R for the second time in the same program. I need to reinitialize correctly because my code is some kind of .dll plugin to an external application. The simplest example I can provide is a modified tests/Embedding/Rplot.c file with one line added. Here each call to "eval_R_command" contains complete initialization/deinitialization of embedded R. Second call to eval_R_command fails: //tests/Embedding/Rplot.c #include "embeddedRCall.h" int main(int argc, char *argv[]) { eval_R_command("plot", argc, argv); // this completes OK eval_R_command(...
2003 Aug 14
0
Simple C-R interface, SEXP and other declarations
...quot;overkill," but it is a step toward something larger. Has anyone done this before? If so, I would love to check out the code. Anyway, when I try to follow the general theme on http://developer.r-project.org/embedded.html I get some errors during compilation. Where are things like "eval_R_command()" and "SEXP" defined? I.e. What do I need to include to get these? g++ -g -Wall -c hello.cc g++ -g -Wall -c doit.cc g++ -g -Wall -c myR.cc -L/usr/local/lib/R/bin -lR myR.cc: In function `int eval_R_command()': myR.cc:34: `SEXP' undeclared (first use this function) . (A bun...
2005 Feb 04
5
simple example of C interface to R
i'd like to use the C interface to R in a program i'm writing. as a starting point, i'm trying to create a very simple C program that uses R. i've read the R documentation on this, but i'm having trouble figuring out where SEXP is defined and how to use it. i noticed someone else on this list also tried to use the C interface, but they ran into similar problems:
2010 Nov 22
4
How to call R from C
Hi all! I read R Extensions manual. But still I am not sure how to call R functions from C. Would any of you give me a sample C code to show how to call R functions - for instance, time series functions - from C in the embedded way of C code? [[alternative HTML version deleted]]