Debian

How to Install R on Debian 12?

how to install r on debian 12

R is an open-source programming language. It is available freely under the Free Software Foundation’s GNU General Public License. R is a language. It is a cross-platform language and can be operated on platforms, such as Linux, Windows, MacOS, etc. It is mainly used for statistical computing.

This article will describe how to install R in Debian 12 (Bookworm) systems.

How to Install R on Debian 12?

R is a popular language used for developing statistical applications and performing data visualizations and analysis. It supports statistical and graphical techniques such as classical statistical tests, regression, clustering, classification, time series analysis, linear and nonlinear modeling, etc.

The steps required to install R are discussed below:

Step 1: Launch Terminal

All applications, system components, and files installed on the system are placed in the Application Launcher. Terminal can be launched by application launcher by pressing the Activities button in the left corner of the screen, then by typing “Terminal” in the search bar or by selecting the Terminal icon:

The following screenshot shows how the Terminal Application looks like on Debian:

Step 2: Update APT Repository

It is highly recommended to make sure that all existing packages are up to date before installing any software. This is to avoid dependency issues. We can do that by running the following command as root or user with sudo privileges:

$ sudo apt update

Step 3: Install R

Now, we will install R by using the default “apt – advanced package tool” by running the following command:

$ sudo apt install r-base

Press “Y” to continue to continue with the installation:

From the above screenshot, it can be seen that R is installed successfully.

Step 3: Verify Installation

We can verify the installation by checking the version of R by running the following command:

$ R --version

Step 4: Launch R

We can launch R by command line by typing “R” on the terminal as follows:

$ R

How to Uninstall R on Debian 12?

In case, we need to completely uninstall R and all its dependencies from our system, we can use the following command:

$ sudo apt remove r-base-core

Press “Y” to continue with uninstallation:

The uninstallation will continue and from the above screenshot, it can be seen that R is uninstalled successfully.

We can verify the uninstallation of R by running the following command:

$ R --version

From the above screenshot, it can be seen that R is uninstalled successfully.

Conclusion

To install R on Debian 12, use the default “apt – advanced package tool” by running the “sudo apt install r-base” command and un the “R –version” command to verify the installation of the R version. This article has discussed the installation of R on the Debian 12 (Bookworm) system using the default “apt” package manager.

Similar Posts