No additional library is necessary.
apt-get
at www.probability.ca. In addition, you need to add the authentification key to make sure that apt-get
will stay happy:% sudo su % echo "deb http://www.probability.ca/cran/bin/linux/ubuntu hardy/" >> /etc/apt/sources.list // // You also need to uncomment this line in /etc/apt/sources.list: // deb http://ca.archive.ubuntu.com/ hardy-backports main restricted universe // % gpg --keyserver subkeys.pgp.net --recv-key E2A11821 % gpg -a --export E2A11821 | sudo apt-key add - % exit
apt-get
to update the source list and install R:% sudo apt-get update % sudo apt-get install r-base r-base-dev
% sudo R // // You are in the R console to install at system-level: // >install.packages("Rserve") // // It will ask for a mirror selection; take one close from home. // >q()
/etc
, you need to create a configuration file named Rserve.conf:% sudo nano /etc/Rserve.conf
workdir /tmp/Rserv pwdfile remote disable auth disable plaintext disable fileio enable port <port> maxinbuf 262144 maxsendbuf 0 uid 48 chroot sockmode 0 umask 0 encoding utf8
/etc/init.d/rserve
:% sudo nano /etc/init.d/rserve
/etc/init.d/rserve
file must contain the following lines:#! /bin/sh # chkconfig: 2345 99 01 # description: Rserve, /etc/init.d/rserve case "$1" in start) echo -n "Starting Rserve daemon: " R CMD Rserve >/dev/null 2>&1 echo "\t\t[STARTED]" ;; stop) echo -n "Stopping Rserve daemon: " killall -s 9 Rserve echo "\t\t[STOPPED]" ;; restart) echo -n "Stopping Rserve daemon: " killall -s 9 Rserve echo "\t\t[STOPPED]" echo -n "Starting Rserve daemon: " R CMD Rserve echo "\t\t[STARTED]" ;; *) echo "Usage: /etc/init.d/rserve {start|stop|restart}" exit 1 esac exit 0
root
can use this file and that the Rserve server process is started at boot time:% sudo chown root:root /etc/init.d/rserve % sudo chmod ugo+x /etc/init.d/rserve % sudo update-rc.d rserve defaults
There are many GUI for R but the one I chose is JGR. To install JGR, simply follow this recipe:
% sudo R javareconf
% sudo R // We are in the R console at system-level > install.packages('JGR') // R will ask for a mirror selection // Install will proceed simply enough. Give it a try: > library(JGR) > JGR() // You should see a R console popping onto your dekstop // with buttons, menus and everything else
% sudo xfce4-menueditor /etc/xdg/xfce4/desktop/menu.xml