R Refersher

Installing R in Ubuntu 14 LTS

sudo apt-get install r-base


Let's verify that installation was  correct. Start an R session.

~$ 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.

>

OOPS!!!..
This installed an old one... i.e
/etc/apt/sources.list had a old reference to R 
To use latest R
 
follow..
 
https://www.digitalocean.com/community/tutorials/how-to-set-up-r-on-ubuntu-14-04
 
 
$ sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list'
 
To authenticate packages downloaded using APT, we have to add a public key. The Ubuntu archives on CRAN are signed with a key with ID E084DAB9. Add this key to your system.
  • gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
Next we need to add the key to apt.
  • gpg -a --export E084DAB9 | sudo apt-key add -

Now that APT has been set up properly, we are ready to use it to install R.
First, we need to update the list of available packages since we updated the sources list.
  • sudo apt-get update
Now we can install R. We use the -y flag to automatically answer Yes when asked if we are sure we want to download the package.
  • sudo apt-get -y install r-base
 




~$ R

R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 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.

>
Good to start...

Now lets get the learning package Swirl

 install.packages("swirl")





Comments

Popular posts from this blog

ScoreCard Model using R

The auxService:mapreduce_shuffle does not exist

Zeppelin and Anaconda