Install R

Install and update R software on Linux

To get the most recent version of R, add the a CRAN repository to the list of APT sources.

a) Ubuntu

sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/"

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

https://cran.rstudio.com/bin/linux/ubuntu/

b) Debian

sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/debian jessie-cran3/"

gpg --keyserver pgp.mit.edu --recv-key 381BA480

gpg -a --export 381BA480 | apt-key add -

https://cran.rstudio.com/bin/linux/debian/

Install R

sudo apt-get update

sudo apt-get install r-base

Upgrade R to a newer R version

sudo apt-get upgrade r-base


Start R by tying "R" Exit R by typing "q()"

R

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"

Copyright (C) 2015 The R Foundation for Statistical Computing

Platform: x86_64-pc-linux-gnu (64-bit)

>

> 3*4 # simple calculation

[1] 12

>

> q() # exit (quit) R

Save workspace image? [y/n/c]: n

See also

sessionInfo() to get current R version


Install RStudio

comfortable R editor and programming tool

# Download and install RStudio on Ubuntu Linux (2018)

wget https://download1.rstudio.org/rstudio-0.99.903-amd64.deb

sudo dpkg -i rstudio-0.99.903-amd64.deb

https://www.rstudio.com/

Error: Package libjpeg62 is not installed ?


Start RSudio by typing rstudio in the command line.


RStudio on remote server

https://www.rstudio.com/products/rstudio/download-server/

Windows

download "base" version

http://mirrors.ebi.ac.uk/CRAN/

# for updating an older R version, uninstall the old version first before installing the latest version

read more

https://www.digitalocean.com/community/tutorials/how-to-set-up-r-on-ubuntu-14-04

http://askubuntu.com/questions/506560/how-do-install-package-of-r-languages-interpreter-for-statistical-computing

http://www.thertrader.com/2014/09/22/installing-rrstudio-on-ubuntu-14-04/

Next

→ Install additional R packages