To install the complete R system, use sudo apt-get update sudo apt-get install r-base Users who need to compile R packages from source [e.g. package maintainers, or anyone installing packages with install.packages()] should also install the r-base-dev package: sudo apt-get install r-base-dev
R users can work in a console or with an IDE (Integrated Development Environment).
In a console mode:
Open a terminal (Ctrl + Alt + T) and type R, enter and then you are welcome to the R world!
$R
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[Previously saved workspace restored]
> a <- 1
> a
[1] 1
> b <- c(1, 2, 3, 4)
> b
[1] 1 2 3 4
>
With an IDE: RStudio IDE is a powerful and productive user interface for R. It’s free and open source, and works great on Windows, Mac, and Linux. From a terminal, type the following command for installing RStudio:
sudo apt-get install rstudio
source: http://cran.r-project.org/bin/linux/ubuntu/README
# Installation To obtain the latest R packages, add an entry like deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu vivid/ or deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu utopic/ or deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu trusty/ or deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu precise/ or in your /etc/apt/sources.list file, replacing <my.favorite.cran.mirror> by the actual URL of your favorite CRAN mirror. See http://cran.r-project.org/mirrors.html for the list of CRAN mirrors. To install the complete R system, use sudo apt-get update sudo apt-get install r-base Users who need to compile R packages from source [e.g. package maintainers, or anyone installing packages with install.packages()] should also install the r-base-dev package: sudo apt-get install r-base-dev
NOTE: REPLACE <my.favorite.cran.mirror> with http://cran.r-project.org/mirrors.html for example.
http://cran.r-project.org/mirrors.html
Install RCurl for http requests
install.packages("RCurl")