compling C code in R for Windows
Masha Kocherginsky wrote:
I have used Splus 3.4 for UNIX and I have a C file that I compiled using "Splus COMPILE" and later called with dyn.load() and .C(). It works in Splus. I want to do the same thing in R, as in just use my .s and .c files and find the equivalent of "Splus COMPILE". I've ran into lots of problems trying to do this in Windows so far, so please help! My questions are: - Do I need additional software (sometimes using Rcmd complains about not understanding what perl is), such as Perl or C complier?
Right, *at least* Perl, gcc and a collection of tools (see below).
- Which directory do I need to put the files in, so that Rcmd can see them? Or do I copy the Rcmd.exe into the directory where my .c files are? If so, what other files do I need to copy?
You have to set the path to the perl / gcc binaries to make them known by your OS.
- Are there any references on how to do it in a simple way, and examples (online or printed)?
Yes. The manual "Writing R Extensions", the R for Windows FAQs and for collecting the tools I'd suggest Brian Ripley's page "http://www.stats.ox.ac.uk/pub/Rtools/".
- How do I do it, exactly?
That's described in the docs mentioned above. Uwe Ligges -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._