[R] Compiling R code to native code?

2012-01-28 Thread Gregory Propf
Simple question: is there a way to compile R scripts to native code?  If not is there anything else that might improve speed?  I'm not even sure that R compiles internally to byte code or not.  I assume it does since all modern languages seem to do this.  Maybe there's a JIT compiler?  Yes, I

Re: [R] Compiling R code to native code?

2012-01-28 Thread Jeff Newmiller
Nope. Most users get speed by using vectorized calculations. If you have already identified how to get correct answers, the next step is something like Rcpp or linking to a shared library written in your language of choice. But seriously, vectorizing is enough for most applications, and making

Re: [R] Compiling R code to native code?

2012-01-28 Thread Bert Gunter
Facts: 1. R does not by default compile bytecode. It uses a read-parse-eval cycle as described in the R Language Manual. 2. However, as of 2.14.0 (anyway) there is a compiler package that is shipped as part of the standard distribution. Written by Luke Tierney and his graduate student minions,

Re: [R] Compiling R code to native code?

2012-01-28 Thread Ben Bolker
Jeff Newmiller jdnewmil at dcn.davis.ca.us writes: Nope. Most users get speed by using vectorized calculations. If you have already identified how to get correct answers, the next step is something like Rcpp or linking to a shared library written in your language of choice. But seriously,

[R] Compiling R code

2008-01-29 Thread Attiglah, Mama
Hi all, I am struggling to compile a massive R code that I have written through some years, aiming to provide automated investment strategies to my Portfolio Managers. You may ask me why do I not rewrite the code in C or C++; the answer is it is really massive and that will take me lots of time.

Re: [R] Compiling R code

2008-01-29 Thread Daniel Oberski
One suggestion you have probably already considered, but: why not R CMD BATCH the script? You can set up an executable to do that. No need to compile the actual R code. If you want to hide the code and/or it has interaction, you can also set it up on a web or intranet server for them, calling the