Article

Table of Contents
Try Vultr Today with

$50 Free on Us!

Installing R on Ubuntu 15.10

Published on: Thu, Apr 28, 2016 at 12:26 pm EST
Programming System Admin Ubuntu

R is a programming language which is often utilized by statisticians because of its capabilities in statistical computing. In this guide, we'll be installing R on Ubuntu 15.10.

Step 1: Installing R

You can install R by executing:

apt-get -y install r-base

Try running the command 'R' (capital letter).

R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 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.

Quit:

q(save = "no")

Step 2: Installing packages

R packages are packages that extend the capabilities of R. Enter R:

R

There are two ways to install R packages. First of all, if you want to install a package only for the current user, you can execute the following in R:

install.packages("name")

If you want to install a package available for all users on the system, there are multiple mirrors for both R and its packages. Execute:

su - -c "R -e \"install.packages('name', repos = 'http://cran.rstudio.com/')\""

Replace name with the package name.

Please note that you do not want to install R with packages on a server with less than 1 GB RAM.

For further learning, please visit the R website.

Want to contribute ?

You could earn up to $300 by adding new articles