Re: [R] Calling R from C (Windows)

2012-10-15 Thread Simon Knapp
Yes. Your looking at R_HOME (the installation directory), not the "directory of the sources". On Tue, Oct 16, 2012 at 10:08 AM, BayesForever wrote: > > I am trying to follow the instructions in section 8.2.2 of "Writing R > extensions", to learn how to call R from C. In this manual and at other

[R] Calling R from C (Windows)

2012-10-15 Thread BayesForever
I am trying to follow the instructions in section 8.2.2 of "Writing R extensions", to learn how to call R from C. In this manual and at other sites I see continual references to examples in "the tests/Embedding directory of the sources". There is no directory named "Embedding" anywhere in my 2

Re: [R] calling R from C

2011-06-25 Thread Desi Ap
hey David:Newbie here. will avoid duplicates next time. thanks... -krishna --- On Sat, 6/25/11, David Winsemius wrote: From: David Winsemius Subject: Re: [R] calling R from C To: "Desi Ap" Cc: r-help@r-project.org Date: Saturday, June 25, 2011, 10:38 PM On Jun 25, 2011, at 11:18 A

Re: [R] calling R from C

2011-06-25 Thread Barry Rowlingson
On Sat, Jun 25, 2011 at 4:18 PM, Desi Ap wrote: > I read R extensions on calling R within c code. I am on windows vista, cygwin > and R-2.13.0.I can compile & link the c code with following commands$gcc > -I/cygdrive/c/Progra~1/R/R-2.13.0/include -c -ggdb Rhello.c > gcc-L/cygdrive/c/Progra~1/R/R

Re: [R] calling R from C

2011-06-25 Thread David Winsemius
On Jun 25, 2011, at 11:18 AM, Desi Ap wrote: I read R extensions on calling R within c code. I am on windows vista, cygwin and R-2.13.0.I can compile & link the c code with following commands$gcc -I/cygdrive/c/Progra~1/R/R-2.13.0/include -c - ggdb Rhello.c gcc-L/cygdrive/c/Progra~1/R/R-2.1

[R] calling R from C

2011-06-25 Thread Desi Ap
I read R extensions on calling R within c code. I am on windows vista, cygwin and R-2.13.0.I can compile & link the c code with following commands$gcc -I/cygdrive/c/Progra~1/R/R-2.13.0/include -c -ggdb Rhello.c gcc-L/cygdrive/c/Progra~1/R/R-2.13.0/bin/i386 -oRhello Rhello.o -lR However I cant run

Re: [R] Calling R from c in Windows XP

2010-03-27 Thread Martin Morgan
On 03/27/2010 07:53 AM, dkStevens wrote: > > I'm searching for answers to four questions (I've been searching the net for > hours...) > > In Windows XP, is it possible to call R functions from a c program? (I've > found examples for Linux/Unix but not Windows) > > If so, is there a simple exampl

Re: [R] Calling R from c in Windows XP

2010-03-27 Thread Dirk Eddelbuettel
David, On 27 March 2010 at 10:08, dkStevens wrote: | Thanks for your prompt response. Apparently my problem is with my R or | Windows setup. When I followed the advice in your return email, here's | the result. I will eat my hat. What you show I had too -- you need to define the environment v

Re: [R] Calling R from c in Windows XP

2010-03-27 Thread dkStevens
Thanks for your prompt response. Apparently my problem is with my R or Windows setup. When I followed the advice in your return email, here's the result. I've been an R user for a number of years and have installed/uninstalled several versions, plus I've installed MinGW, RTools, gcc/gfortran,

Re: [R] Calling R from c in Windows XP

2010-03-27 Thread Dirk Eddelbuettel
On 27 March 2010 at 09:02, dkStevens wrote: | This may simply expose my ignorance in this type of coding, but, | unfortunately it's not that simple because I did using the RInside.h and | received several screens of error messages from gcc telling me that it | couldn't find the include file and th

Re: [R] Calling R from c in Windows XP

2010-03-27 Thread Dirk Eddelbuettel
On 27 March 2010 at 11:50, Khanh Nguyen wrote: | What examples are you talking about. You only need to include | ... More information is here | http://dirk.eddelbuettel.com/code/rinside.html Khanh is quite correct: RInside is self-contained. It also doesn't get much simpler than the examples we s

Re: [R] Calling R from c in Windows XP

2010-03-27 Thread dkStevens
This may simply expose my ignorance in this type of coding, but, unfortunately it's not that simple because I did using the RInside.h and received several screens of error messages from gcc telling me that it couldn't find the include file and the scores of additional include files that rinside.h

Re: [R] Calling R from c in Windows XP

2010-03-27 Thread Khanh Nguyen
What examples are you talking about. You only need to include ... More information is here http://dirk.eddelbuettel.com/code/rinside.html The other external thing you need is the Rcpp package, which you can do with install.packages('Rcpp') On Sat, Mar 27, 2010 at 11:40 AM, dkStevens wrote: > >

Re: [R] Calling R from c in Windows XP

2010-03-27 Thread dkStevens
I have - but when I tried their simple example no luck - too many missing include files to chase down. I'm looking for something more direct, I guess, that I have a little control over. -- View this message in context: http://n4.nabble.com/Calling-R-from-c-in-Windows-XP-tp1693440p1693478.html Se

Re: [R] Calling R from c in Windows XP

2010-03-27 Thread dkStevens
I've looked at this a bit and it seems ok, if not a little convoluted. We're trying to stay away from com objects, so I was hoping for something more direct. I've seen some examples (e.g. RInside) but can't get them to work -too many include files, etc. that I can't find. -- View this message in

Re: [R] Calling R from c in Windows XP

2010-03-27 Thread Erich Neuwirth
If you want to call R from within VB.NET you might want to look at the statconnDCOM server (available at rcom.univie.ac.at) It wraps R into a (D)COM server and therefore allows any (D)COM client to access R on windows. VB.NET is a (D)COM client. On 3/27/2010 3:53 PM, dkStevens wrote: > > I'm se

Re: [R] Calling R from c in Windows XP

2010-03-27 Thread Khanh Nguyen
Have you looked at RInside ? -k On Sat, Mar 27, 2010 at 10:53 AM, dkStevens wrote: > > I'm searching for answers to four questions (I've been searching the net for > hours...) > > In Windows XP, is it possible to call R functions from a c program? (I've > found examples for Linux/Unix but not Wi

[R] Calling R from c in Windows XP

2010-03-27 Thread dkStevens
I'm searching for answers to four questions (I've been searching the net for hours...) In Windows XP, is it possible to call R functions from a c program? (I've found examples for Linux/Unix but not Windows) If so, is there a simple example to get started using gcc with R-2.10.0? If so, is it p

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, specifi

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 #include #include #include extern int R_running_as_main_program; /* in ../unix/system.c */ int main(int ac, char **av) { SEXP aleph, beth; // R_running_as_main_program = 1; // A //

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, speci

[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 file