How to install R programming on Ubuntu 18.04?

Windows Articles

How to install NetBeans on Windows 10

Hi! Today we're going to talk a little about Netbeans. This is an integrated development environment that allows programming in various languages....

How to install Atom Text Editor on Ubuntu 20.04?

It is often said that the process of software development is complex. And this is true, therefore it is required to use...

How to install Brackets in Windows 10 plus extensions

Hello! Brackets is an open-source code editor designed by Adobe for web developers. Additionally, it has a very simple and modern interface...

How to install Docker on OpenSUSE 15.2 / 15.1?

Docker is a fairly popular technology in today’s sysadmin. It is logical to think because it means a complete change in the...

How to analyze the network with IP Tools for Android

Hi! If you want to analyze and adjust the network almost professionally, then this post is for you. Indeed, IP Tools is...
angeloma
angeloma
Senior Writer and partner

Programming is an elementary part of computer science. It creates applications that solve some daily problems. You can make applications of all kinds and some oriented to statistics. So, this article will help you install R programming in Ubuntu 18.04.

R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS.In addition, it is also a very well documented language and has its own LaTeX-like documentation format.

Features

Among the advantages of R, is its great syntactic similarity with S-Plus, which has facilitated the migration of many users. Equally important is the fact that it is a language with a very active development cycle.

One of R’s strengths is the ease with which well-designed publication-quality plots can be produced, including mathematical symbols and formulae where needed.

Another great advantage is that R is multiplatform, that is to say, it can be installed both in Windows and in any Linux distribution.

Let’s not talk anymore and we are going to install R programming on Ubuntu 18.04.

0. What you need

In the first place, it is necessary that you have installed Ubuntu 18.04 which is the recommended platform for development with this language.

It is also necessary that you have a user who can execute commands in the terminal as root.

So, let’s start.

1. Upgrade the system

In order to have the latest security patches and thus ensure the proper functioning of the system, it is necessary to make a general update to all packages.

:~$ sudo apt update && sudo apt upgrade

1. Upgrade the system
1. Upgrade the system

Now, you can continue with the installation.

2. Add GPG keys for the R repository

A simple way to install R is through APT. To do this we must add the R repository, however, first you have to add the GPG key.

:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

2.- Adding the GPG key
2.- Adding the GPG key

Then, add the repository.

:~$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'

3.- Adding the repository
3.- Adding the repository

Now, you can install R programming.

3. Install R programming

Now just run the command to install R programming.

:~$ sudo apt update
:~$ sudo apt install r-base

4.- Install R programming
4.- Install R programming

Now, you can start to use R.

4. Verify the installation and using R

Now, it is necessary to verify the installation that we have made. To do this, type on the terminal.

:~$ sudo -i R

And you’ll see R’s console.

5.- R console on Ubuntu 18.04
5.- R console on Ubuntu 18.04

Now let’s make the typical “Hello World” using R.

6.- Hello World
6.- Hello World

5. Conclusion

R is not a programming language for all people or for all circumstances. On the other hand, it is a language rather oriented to manipulation of data for statistical purposes and that makes it a quite reliable alternative for your subject.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install NetBeans on Windows 10

Hi! Today we're going to talk a little about Netbeans. This is an integrated development environment that allows programming in various languages....

How to install Atom Text Editor on Ubuntu 20.04?

It is often said that the process of software development is complex. And this is true, therefore it is required to use...

How to install Brackets in Windows 10 plus extensions

Hello! Brackets is an open-source code editor designed by Adobe for web developers. Additionally, it has a very simple and modern interface...

How to install Docker on OpenSUSE 15.2 / 15.1?

Docker is a fairly popular technology in today’s sysadmin. It is logical to think because it means a complete change in the...

How to analyze the network with IP Tools for Android

Hi! If you want to analyze and adjust the network almost professionally, then this post is for you. Indeed, IP Tools is...