1

I work on several R projects at the same time. One of them involves a simulation with a for-loop, which I hope to speed up by using a JIT-compiler. To do so, I added to the file Rcmd_environ in my R-directory/etc the lines following this recommendation.

R_COMPILE_PKGS=TRUE
R_ENABLE_JIT=3

Now I wonder, whether it is possible, to turn this on and off via a script. This way, I wouldn't have JIT-compilation in my other projects. Any ideas?

mondano
  • 827
  • 10
  • 29

1 Answers1

3

You can load the compiler library and then set the JIT level via calling the 'enableJIT` function.

For e.g. you can do

require(compiler)
enableJIT(3)

to get full JIT compilation.

Frash
  • 724
  • 1
  • 10
  • 19
  • thanks. I then get a lots of "Note: no visible binding for global variable xy". How is that to be understood? – mondano Jul 31 '15 at 14:00
  • I see that this is rather no reason to worry, http://stackoverflow.com/questions/8096313/no-visible-binding-for-global-variable-note-in-r-cmd-check – mondano Jul 31 '15 at 14:14