This brief tutorial shows students and new users how to install R on Ubuntu 18.04 | 16.04.
R is a open source, simple and efficient programming language and environment for statistical computing and graphics.
R is widely used among statisticians and data miners for developing statistical software and performing data analysis.
For student or new user looking for a Linux system to learn on, the easiest place to start is Ubuntu Linux OS. It’s a great Linux operating system for beginners.
Ubuntu is an open source Linux operating systems that runs on desktops, laptops, server and other device.
While learning Ubuntu, you will find that Linux isn’t so different than Windows and other operating systems in so many ways, especially when it comes to using the system to get work done.
For more about R, please check out its homepage.
When you’re ready to install R on Ubuntu, follow the steps below:
Installing R on Ubuntu
R packages are available in Ubuntu default repositories. However, the package version in Ubuntu might not be the latest. To install the latest and get access to newer features and enhancements, you may have to add its repository to Ubuntu.
At the time of writing this article, the latest stable version of R is version 3.6.3.
Install the packages necessary to add a new repository over HTTPS by running the commands below:
sudo apt install apt-transport-https software-properties-common
After that, run the commands below to add a third party repository key and repository to Ubuntu.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 sudo add-apt-repository 'deb bionic-cran35/'
Now that the apt repository is added, update Ubuntu package and install the R package by running the commands below:
sudo apt update sudo apt install r-base
After installing, you can run the commands below to verify that the installation was successful.
R --version
It should output similar lines as below:
R version 3.6.3 (2020-02-29) -- "Holding the Windsock" Copyright (C) 2020 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 the terms of the GNU General Public License versions 2 or 3. For more information about these matters see
That’s how to install R on Ubuntu 18.04 | 16.04.
Conclusion:
This brief tutorial showed students and new users how to install R programming language on Ubuntu 18.04 | 16.04. If you find any error above, please use the comment form below to report it.
Thanks,
You may also like the post below: