How To Install R on Rocky Linux 8

In this tutorial we learn how to install R on Rocky Linux 8. R is A language for data analysis and graphics

Introduction

In this tutorial we learn how to install R on Rocky Linux 8.

What is R

This is a metapackage that provides both core R userspace and all R development components. R is a language and environment for statistical computing and graphics. R is similar to the award-winning S system, which was developed at Bell Laboratories by John Chambers et al. It provides a wide variety of statistical and graphical techniques (linear and nonlinear modelling, statistical tests, time series analysis, classification, clustering, …). R is designed as a true computer language with control-flow constructions for iteration and alternation, and it allows users to add additional functionality by defining new functions. For computationally intensive tasks, C, C++ and Fortran code can be linked and called at run time.

We can use yum or dnf to install R on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install R.

Install R on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install R using dnf by running the following command:

sudo dnf -y install R

Install R on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install R using yum by running the following command:

sudo yum -y install R

How To Uninstall R on Rocky Linux 8

To uninstall only the R package we can use the following command:

sudo dnf remove R

R Package Contents on Rocky Linux 8

References

Summary

In this tutorial we learn how to install R on Rocky Linux 8 using yum and dnf.