From ArchWiki
Revision as of 23:10, 10 September 2011 by Thestinger (talk | contribs) (recat)
Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

R is a free software environment for statistical computing and graphics (http://www.r-project.org/).

Installing R

It is very easy to install R in Arch Linux:

# pacman -S r

Installing R packages

There are many add-on R packages, which can be browsed on The R Website.. They can be installed from within R using the R install.packages command. It is not necessary to be superuser or have root privileges when doing this -- R can install its packages locally for the individual user. This is the safest way to install R packages and won't conflict with the pacman package management.

Running R

R can be run from the command line, by using the R command:

# R

Adding a graphical frontend to R

The linux version of R does not include a graphical user interface. However, third-party user interfaces for R are available, such as R commander and RKWard.

R Commander frontend

R Commander is a popular user interface to R. There is no Arch linux package available to install R commander, but it is an R package so it can be installed easily from within R.

Run 'R' from the command line. Then type:

> install.packages("Rcmdr", dependencies=TRUE)

This can take some time.

You can then start R Commander from within R using the library command:

> library("Rcmdr")

RKWard frontend

RKWard can be installed from the Arch Linux AUR, and is an open-source frontend which allows for data import and browsing as well as running common statistical tests and plots.

Note: It will be assumed that you know how to build packages from the AUR. If you have never used the AUR before, please take a look at the AUR User Guidelines.

First install the dependencies:

# pacman -S kdelibs php qt r automoc4

Then get the AUR sources and PKGBUILD file:

As a user from the command line:

# wget http://aur.archlinux.org/packages/rkward/PKGBUILD
# wget http://aur.archlinux.org/packages/rkward/rkward.tar.gz
# makepkg

As root/superuser, install the package using pacman (the version may be different from 0.5.2-1, as rkward is under development).

# pacman -U rkward-0.5.2-1-i686.pkg.tar.gz