Difference between revisions of "R"

From HCL
Jump to: navigation, search
(New page: http://cran.r-project.org/)
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
http://cran.r-project.org/
 
http://cran.r-project.org/
 +
 +
== Installation from sources ==
 +
 +
1. R sould be configured as a shared library
 +
<source lang="bash">
 +
$ ./configure --prefix=DIR --enable-R-shlib=yes
 +
$ make install
 +
</source>
 +
2. Set up environment
 +
<source lang="bash">
 +
$ export R_HOME=DIR/lib/R
 +
$ export LD_LIBRARY_PATH=$R_HOME/lib:$LD_LIBRARY_PATH
 +
</source>
 +
3. Install required packages
 +
<source lang="bash">
 +
$ DIR/bin/R
 +
> install.packages(c(”sandwich”, ”strucchange”, ”zoo”))
 +
</source>
 +
4. Set up developer environment
 +
<source lang="bash">
 +
$ export CPATH=$R_HOME/include:$CPATH
 +
$ export LIBRARY_PATH=$R_HOME/lib:$LIBRARY_PATH
 +
</source>

Latest revision as of 07:30, 16 March 2010

http://cran.r-project.org/

Installation from sources

1. R sould be configured as a shared library

$ ./configure --prefix=DIR --enable-R-shlib=yes
$ make install

2. Set up environment

$ export R_HOME=DIR/lib/R
$ export LD_LIBRARY_PATH=$R_HOME/lib:$LD_LIBRARY_PATH

3. Install required packages

$ DIR/bin/R
> install.packages(c(”sandwich”, ”strucchange”, ”zoo”))

4. Set up developer environment

$ export CPATH=$R_HOME/include:$CPATH
$ export LIBRARY_PATH=$R_HOME/lib:$LIBRARY_PATH