środa, 19 listopada 2014

Installing R tools in Ubuntu 14.04

First of all you need to instal R programming language.
Then you can install R Studio program.

In order to intall R from package you need to install
prerequisites:
fort77; f2c; gfortran 
Type the following:

sudo apt-get install fort77 f2c gfortran libreadline-dev

You can think about installing gfortran-4.8-doc as well.

And I had already java installed on my system with paths set:
JAVA_HOME        : /usr/lib/jvm/java-1.7.0-openjdk-amd64
Java library path: /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server


Then you can download R tarball package from r-project.org site.
tar -xzvf R-3.1.1.tar.gz

Then type
 ./configure --with-x=yes --enable-R-shlib

(previous ./configure --with-readline=no)
make
make install
Other makes in my case did not work e.g. make pdf.


In order to install RStudio the best way is to install already precompiled packages:

libjpeg62 is required
sudo apt-get install lipjpeg62

sudo dpkg -i  rstudio-0.98.1073-amd64.deb

With tarball you need to unpack and build with Cmake
In unpacked folder you do:

mkdir build && cd build
cmake -G "Unix Makefiles" -DRSTUDIO_TARGET=Desktop -DCMAKE_BUILD_TYPE=Release ..

But first you need to make sure you have CMakeFiles.txt set up properly.

This was not in my case