Re: [R] Calling R from C - part way there but need a push!

2008-04-30 Thread Jeffrey Horner
Maximillian Murphy wrote on 04/29/2008 11:19 AM: 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,

[R] Calling R from C - part way there but need a push!

2008-04-29 Thread Maximillian Murphy
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

Re: [R] Calling R from C - part way there but need a push!

2008-04-29 Thread Duncan Murdoch
On 29/04/2008 12:19 PM, Maximillian Murphy wrote: 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,

Re: [R] Calling R from C - part way there but need a push!

2008-04-29 Thread Maximillian Murphy
I'm afraid I haven't quite got the hang of this yet. Here's a Hello World: #include R.h #include Rinternals.h #include Rembedded.h #include stdio.h extern int R_running_as_main_program; /* in ../unix/system.c */ int main(int ac, char **av) { SEXP aleph, beth; //