R

R

The R language is widely used among statisticians and data miners for developing statistical software and data analysis. Nowadays, R and Python are both part of a typical data science workflow.

See Why you should learn R first for data science.

For downloading latest version of R, adding additional repositories to debian repository list is required.

  • For a backport of latest R to Debian 8 (jessie), simply open /etc/apt/sourece.list.

    $ sudo vim /etc/apt/source.list
    
  • Then add following lines into /etc/apt/sourece.list.

    deb http://<favourite-cran-mirror>/bin/linux/debian jessie-cran3/
    deb-src http://<favourite-cran-mirror>/bin/linux/debian jessie-cran3/
    

    NOTE: You need to substitute <favourite-cran-mirror> by one of the mirror URLs listed in the mirror list.
    For example: deb http://cran.csie.ntu.edu.tw/bin/linux/debian jessie-cran3/.

  • Fetch and import Debian backports archives on CRAN (CRAN Debian archive) with key ID 381BA480.

    $ sudo apt-key adv --keyserver keys.gnupg.net --recv-key 381BA480
    
  • Finally, install R.

    $ sudo apt-get update
    $ sudo apt-get install r-base r-base-dev
    
  • After the installation, execute this command to check the version of R in your server is up-to-date.

    $ R --version
    

Useful R packages

One feature of R is its capabilities to extend through third-party packages. Currently, the CRAN package repository features 7749 available packages (2015-01-09). There are also many Task Views for R users to browse packages for differenct area of interest.

We will introduce some useful packages here.

plyr/dplyr: Fast, consistent tools for data manipulating, both in or out of memory.
data.table: An extension of data.frame for large data.
ggplot2: A plotting system for R, based on the grammar of graphics. spatstat: Spatial statistics focusing on spatial point patterns.
installr: Make updating R (on windows) as easy as running a function.
rmarkdown: Enable easy creation of dynamic documents, presentations, and reports from R.
DBI: A database interface for communication between R and relational database management systems.

results matching ""

    No results matching ""