In this tutorial, we will look at how to Install and Use R and Rstudio on CentOS 9/ RHEL 9. R is a programming language that can be built and executed on a variety of Unix platforms, macOS, and Windows. It also functions as a statistical computing and graphical software environment. It is free software that is released in source code form under the provisions of the GNU General Public License issued by the Free Software Foundation. It offers a wide range of statistical techniques, including time series analysis, classification, filtering, linear and non-linear modeling, traditional statistical tests, and more. Its well-designed charts, which are suitable for publishing, can make it simple to construct them, along with the necessary mathematical notation and formulas.
It may be compared to the Python Programming language which is easier and maintain larger scale code as compared to R which might be difficult to maintain. R can run slowly due to how data is stored and also cannot be embedded in web applications. However, R has incredible data visualization and graphics capabilities. It has hundreds of packages/libraries solely for analytics and it is fantastic for statical analysis. Other software similar to R include; SPSS, MATLAB, Mathematica, SAS, Julia, GNU Octave, PSPP, and more.
R environment is a fully planned and coherent integrated with software facilities for data manipulation, calculation and graphical display. You can think of it as an environment within which statistical techniques are implemented and not as a statistics system. The additional facilities include;
- Powerful data handling and storage facility.
- Set of operators for computations on arrays, especially matrices.
- A vast, coherent, integrated collection of intermediate tools for data analysis.
- Graphical facilities for data analysis and display either on-screen or on hardcopy.
- A simple, and powerful programming language with conditionals, loops, user-defined recursive functions, and input and output facilities.
RStudio is an Integrated Development Environment for R. operates on Windows, macOS, and Linux and is offered in open source and paid editions. It comes with features for graphing, history, debugging, and workspace management, as well as a console and a syntax-highlighting editor that allows direct code execution. Data is executed directly from the source editor.
There are 2 portions of RStudio
- RStudio Desktop that runs on your desktop
- RStudio Server that centralizes access and computation.
Some of its features include;
- Powerful authoring & Debugging to diagnose and fix errors quickly.
- Integrated R help and documentation.
- Easily manage multiple working directories using projects.
- Extensive package development tools.
- Workspace browser and data viewer.
- RStudio has integrated support for Git and Subversion.
- Supports interactive graphics with Shiny and ggvis.
This guide will show you how to install R and R studio on CentOS 9|RHEL 9. We will begin by showing you how to install R on CentOS/RHEL. Check below for more insights;
Install R on CentOS 9/ RHEL 9
Before the installation, you will need to enable the EPEL repository on your system. Follow the guide on the link provided, once done, proceed as follows.
The first step is to ensure your system packages are up to date. In order to do so, run the command below;
sudo dnf update -y
Once everything has been updated successfully with no errors, you can then continue to install R with the following command.
sudo dnf install R
Check for the version to confirm the installation.
$ R --version
R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
Install RStudio on CentOS 9/ RHEL 9
Go to the Official Downloads page to grab a copy of the latest RStudio package for RHEL|CentOS. Alternatively, you can use the wget utility to download the package.
Then install the package with the following command.
sudo dnf install rstudio-2022.07.2-576-x86_64.rpm
Start RStudio from the Application launcher.
Once the program is started, you should see a screen that looks like the one below.
We have installed R and RStudio on CentOS 9/ RHEL 9 systems. R is a programming language that is used in statistical analysis. It is simple to learn with intuitive data visualizations and graphical capabilities. RStudio on the other hand, is an IDE that allows you to connect with R and be more productive with the Language. It also supports Python Programming Language. RStudio is a professional software for data analysis, package management, and sharing data products. Check below for some of our other articles;