r official Website update Instructions
Https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/linux/ubuntu/README.html
This article mainly explains how to install and update the R language under Ubuntu. Will describe separately what the R language is, the simple way to install the R language, install or update the R language by updating the source , and install the R Language integrated development environment.
0.What is the R language
the R language is mainly used for statistical analysis, drawing of the language and operating environment. R was originally developed by Rossihaka and Robertgentleman from the University of Oakland, New Zealand . (also known as R) is now developed by the R Development core team. R is a GNU project based on the S language, so it can also be used as an implementation of the S language , and code written in S can be run without modification in the R environment. The syntax for R is from scheme.
the original code of R can be freely downloaded, and the compiled version of the executable file can be downloaded and run on a variety of platforms, including UNIX ( also including FreeBSD and Linux), Windows and MacOS. R is primarily a command-line operation, while someone has developed several graphical user interfaces.
R built in a variety of statistical and digital analysis functions. the functions of R can also be enhanced through the installation Kit (Packages, user-authored features). Because of the blood of S, R has a stronger object-oriented ( OO programming) function than other programming languages for statistical or mathematical purpose .
Another strength of R is the drawing function, which has the quality of the printing, and the mathematical notation can be added.
While R is primarily used for statistical analysis or development of statistical-related software, it is also used as a matrix calculation. Its analysis speed is comparable to Gnuoctave even business software matlab.
Http://www.oschina.net/p/r-language
https://www.r-project.org/
1.simple way to install the R language:
Search r-base Direct installation in Ubuntu Software Center
Or
Add a source and then install it via Apt-get :
sudo apt-get install R-base
The problem is that R is not the latest version, and some new libraries require a new version of R support that requires an update source to install or update R
2.to install or update R by updating the source
2.1 Adding a new Source (command-line)
sudo gedit/etc/apt/sources.list
Add: Deb http://cran.stat.ucla.edu/bin/linux/ubuntutrusty/
Save (trusty for Ubuntu version number)
2.2 is executed at the command line:
sudo apt-get update (update source)
sudo apt-get install r-base r-recommended (installation)
Or
sudo apt-get upgrade (update)
Problems you may encounter:
thefollowing signatures couldn ' t be verified because the public key IsNot Available:no_pubkey 51716619E084DAB9
Here's how to fix it:
Get key
gpg--keyserver keyserver.ubuntu.com --recv-key E084DAB9
Update Apt-key
gpg-a --export E084DAB9 | sudo apt-key add -
If the firewall blocks the 11371 port. You can try the following commands:
gpg--keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E084DAB9
Update Apt-key
gpg-a --export E084DAB9 | sudo apt-key add -
3.Installing the R Language integrated development environment
Integrated development environment for R language Rstudio, including IDE for desktop users and LINUXR server for remote access via browser
Installation: https://www.rstudio.com/products/rstudio/download/
Install and update the R language under Ubuntu