o Package compiler is now provided as a standard package. See ?compiler::compile for information on how to use the compiler. This package implements a byte code compiler for R: by default the compiler is not used in this release. See the 'R Installation and Administration Manual' for how to compile the base and recommended packages.
See this page for benchmarking on the use of 'compiler' and it also show how the syntax that you use could affect the efficiency of your code! interesting!
This is like the perl /o option in regular expressions, you compile your function and from now on it run much faster
> library(compiler) > lf <- cmpfun(f)
Some links with tricks for updating your installed modules
Windows
http://www.r-statistics.com/2011/04/how-to-upgrade-r-on-windows-7/
http://stackoverflow.com/questions/1401904/painless-way-to-install-a-new-version-of-r
Linux
http://nsaunders.wordpress.com/2011/04/15/r-2-12-to-2-13-package-upgrade/
Mac
http://onertipaday.blogspot.com/2008/10/r-upgrade-on-mac-os-x-1055-leopard.html
No comments:
Post a Comment