This article is outdated and may not work correctly for current operating systems or software.
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.
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.
q(save = "no")
R packages are packages that extend the capabilities of R. Enter 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:
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/')\""
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.