R is an open source programming language specifically used for statistical calculations and graphics. In this tutorial, we will install R on an Ubuntu 18.04 server.
An Ubuntu** server** with a non-root account that can use the sudo
command has been set up, and the firewall has been turned on. Students who don’t have a server can buy it from here, but I personally recommend you to use the free Tencent Cloud Developer Lab for experimentation, and then buy server.
Log in to your Ubuntu 18.04 server as a sudo non-root user and add the relevant GPG key.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
If you are not using 18.04, please find the corresponding repository from the R Project Ubuntu list, named after each version.
sudo apt update
sudo apt install r-base
If prompted to confirm the installation, press y
to continue.
Start R's interactive shell as root.
sudo -i R
You should receive output similar to the following:
R version 3.5.1(2018-07-02)--"Feather Spray"Copyright(C)2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu(64-bit)...
Type 'demo()'for some demos,'help()'for on-line help, or
' help.start()'for an HTML browser interfaceto help.
Type 'q()' to quit R.
>
This confirms that we have successfully installed R and entered its interactive shell.
For more Ubuntu tutorials, please go to [Tencent Cloud + Community] (https://cloud.tencent.com/developer?from=10680) to learn more.
Reference: "How To Install R on Ubuntu 18.04 [Quickstart]"
Recommended Posts