March 20, 2013

Install R in ubuntu from command line

 Steps to install R in ubuntu from command line:
  1. add the following configuration in /etc/apt/sources.list file
    # configuration for R
    deb http://cran.nexr.com/bin/linux/ubuntu precise/
  2. Command: sudo apt-get update
  3. Command: sudo apt-get install r-base
  4.  Command to start R: R
  5. Command to quit R: q()

NOTE:

1) Step-1 is dependent on the version of ubuntu. You can find the ubuntu version using the following command:

 lsb_release -a

2) You can also different mirror site for step-1. The list is available here.

3) You may need to use secure apt. In that case, just after step-1 (before step-2), run the following commands:

gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E084DAB9
 gpg -a --export E084DAB9 | sudo apt-key add - 
 





 
Reference: http://cran.r-project.org/bin/linux/ubuntu/README

No comments:

Post a Comment