Install R in Ubuntu 12.04 Precise Pangolin

January 10, 2013
By

(This article was first published on Hidden Treasures, and kindly contributed to R-bloggers)

R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS.

One of my main motivations to install R is Sweave. The Sweave is a literate programming language which integrates LaTeX and R code. The main idea of the Sweave is to combine data analysis code and standard formatted text into a single document.

Installation

The Ubuntu CRAN (The Comprehensive R Archive Network) packages have been signed with a new pgp key. The Ubuntu archives on CRAN are signed with the key of "Michael Rutter" with key ID E084DAB9. To add the key to your system with one command, open terminal (Ctrl+Alt+T) and use:

$ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys E084DAB9

Open your sources.list file in gedit

$ sudo gedit /etc/apt/sources.list

and add the following line (using http://cran.rstudio.com/ mirror) at the end of the file:

deb http://cran.rstudio.com/bin/linux/ubuntu/ precise/

(You can go to http://cran.r-project.org/mirrors.html for the list of CRAN mirrors and replace the current URL mirror with your favorite one)

To install the complete R system, use

$ sudo apt-get update

$ sudo apt-get install r-base

if you need to compile R packages from source, also install the r-base-dev package:

$ sudo apt-get install r-base-dev

That's all.

To leave a comment for the author, please follow the link and comment on their blog: Hidden Treasures.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)