R.installation.guide

download R.installation.guide

of 4

Transcript of R.installation.guide

  • 8/16/2019 R.installation.guide

    1/4

    R installation on Ubuntu

     First attempt $ sudo apt-get install r-base

    This installed R 2.14 version.

     Remove R 2.14 and fix errors$ sudo apt-get remove r-base Reading package lists... DoneBuilding dependency treeReading state information... DoneThe following packages were automatically installed and are no longer required:r-cran-foreign r-cran-cluster libnet-ssleay-perl libjpeg-turbo8-devr-cran-kernsmooth gfortran-4.6 r-cran-rpart libblas-dev libxml-parser-perlliburi-perl r-cran-mass libhtml-parser-perl patchutils r-cran-mgcvr-cran-spatial libhttp-daemon-perl libncurses5-dev libfont-afm-perlr-base-dev libhttp-negotiate-perl libfile-listing-perl libhtml-form-perl

    r-cran-lattice r-cran-nlme liblapack3gf r-doc-html r-cran-nnet cdbslibreadline6-dev libpcrecpp0 libhtml-tree-perl r-recommended intltoolr-cran-class libencode-locale-perl liblapack-dev libhttp-date-perllibmailtools-perl liblwp-protocol-https-perl libtinfo-dev r-base-corelibhttp-cookies-perl libhttp-message-perl libjpeg-dev python-scourlibnet-http-perl gfortran r-cran-survival zlib1g-dev libhtml-format-perlr-cran-boot libblas3gf libjpeg8-dev libsocket6-perl libgfortran3libpcre3-dev dh-translations libhtml-tagset-perl r-cran-codetoolsr-base-html libwww-perl libio-socket-ssl-perl libwww-robotrules-perlliblwp-mediatypes-perl r-cran-matrix dpatch libbz2-devlibio-socket-inet6-perl libreadline-dev libpng12-dev

    Use 'apt-get autoremove' to remove them.The following packages will be REMOVED:r-base

    0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.After this operation, 71.7 kB disk space will be freed.Do you want to continue [Y/n]? Y(Reading database ... 173506 files and directories currently installed.)Removing r-base ...E: Malformed line 61 in source list /etc/apt/sources.list (dist)E: The list of sources could not be read.E: Malformed line 61 in source list /etc/apt/sources.list (dist)E: The list of sources could not be read.

    The malformed line was:deb http://cran.revolutionanalytics.com 

    So removed this line from the sources.list and then:$ sudo apt-get remove r-base Reading package lists... DoneBuilding dependency treeReading state information... DonePackage r-base is not installed, so not removedThe following packages were automatically installed and are no longer required:r-cran-foreign r-cran-cluster libnet-ssleay-perl libjpeg-turbo8-devr-cran-kernsmooth gfortran-4.6 r-cran-rpart libblas-dev libxml-parser-perlliburi-perl r-cran-mass libhtml-parser-perl patchutils r-cran-mgcvr-cran-spatial libhttp-daemon-perl libncurses5-dev libfont-afm-perlr-base-dev libhttp-negotiate-perl libfile-listing-perl libhtml-form-perl

    http://cran.revolutionanalytics.com/http://cran.revolutionanalytics.com/

  • 8/16/2019 R.installation.guide

    2/4

      r-cran-lattice r-cran-nlme liblapack3gf r-doc-html r-cran-nnet cdbslibreadline6-dev libpcrecpp0 libhtml-tree-perl r-recommended intltoolr-cran-class libencode-locale-perl liblapack-dev libhttp-date-perllibmailtools-perl liblwp-protocol-https-perl libtinfo-dev r-base-corelibhttp-cookies-perl libhttp-message-perl libjpeg-dev python-scourlibnet-http-perl gfortran r-cran-survival zlib1g-dev libhtml-format-perlr-cran-boot libblas3gf libjpeg8-dev libsocket6-perl libgfortran3libpcre3-dev dh-translations libhtml-tagset-perl r-cran-codetools

    r-base-html libwww-perl libio-socket-ssl-perl libwww-robotrules-perlliblwp-mediatypes-perl r-cran-matrix dpatch libbz2-devlibio-socket-inet6-perl libreadline-dev libpng12-dev

    Use 'apt-get autoremove' to remove them.0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    $ sudo apt-get update 

    Then went back to sources list, and added the following line:deb http://cran.revolutionanalytics/bin/linux/ubuntu precise/

    Then:$ sudo apt-get update

    This gave the following error:W: GPG error: http://cran.revolutionanalytics.com precise/ Release: The followingsignatures couldn't be verified because the public key is not available: NO_PUBKEY51716619E084DAB9

    Fied the error with:$ gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9gpg: directory `/home/mahesh/.gnupg' createdgpg: new configuration file `/home/mahesh/.gnupg/gpg.conf' createdgpg: WARNING: options in `/home/mahesh/.gnupg/gpg.conf' are not yet active during this rungpg: keyring `/home/mahesh/.gnupg/secring.gpg' createdgpg: keyring `/home/mahesh/.gnupg/pubring.gpg' createdgpg: requesting key E084DAB9 from hkp server keyserver.ubuntu.comgpg: /home/mahesh/.gnupg/trustdb.gpg: trustdb createdgpg: key E084DAB9: public key "Michael Rutter " importedgpg: Total number processed: 1gpg: imported: 1 (RSA: 1)

    $ gpg -a --export E084DAB9 | sudo apt-key add -OK

    $ sudo apt-get update

    !ow ever"thing was oka" with u#date, and so the last line was:Reading package lists... Done

    Install R 2.15$ sudo apt-get install r-base r-base-dev

    $ver"thing was oka". Then checked whether correct R version was installed:

    $ RR version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"Copyright (C) 2012 The R Foundation for Statistical ComputingISBN 3-900051-07-0

  • 8/16/2019 R.installation.guide

    3/4

  • 8/16/2019 R.installation.guide

    4/4

    > source("http//!ioconductororg/!ioc#iteR"$> !ioc#ite("!iomaRt"$%io&_mirror http//!ioconductororg'sing %ioconductor ersion )*) (%ioc+nstaller **0,$- R ersion ,0*+nstalling package(s$ .!iomaRt.also installing the dependencies 1#’- R&url’

    -

    - The downloaded source packages are in  ‘/tmp/Rtmp2rw345/downloaded_packages’