Install R & RStudio on CentOS 8 / RHEL 8 Linux

The
You can download this article in PDF format to support us through the following link.

Download the guide as a PDF

turn off
The

The
The

Welcome to our guide to learn how to install R & RStudio on CentOS 8 / RHEL 8 Linux. R is a popular programming language used for graphical representation and statistical calculation of data. If you are a full-time R developer, you need an IDE version. This is where RStudio comes in. RStudio is a set of integrated tools designed to help R developers improve productivity and efficiency.

Rstudio comes with powerful tools that can be used to draw, view historical records, debug and manage workspaces. There are two versions of RStudio – Open source or commercial. Choose the version that best suits your business needs.

RStudio features

  • Runs on Windows, Linux and macOS
  • Syntax highlighting, code completion and smart indentation
  • Integrated support for Git and Subversion
  • Execute R code directly from the source code editor
  • Quickly jump to function definition
  • Use projects to easily manage multiple working directories
  • Integrated R help and documentation
  • Interactive debugger to quickly diagnose and repair errors
  • Extensive software package development tools
  • Support interactive graphics via Shiny and ggvis
  • Support creation of HTML, PDF, Word documents and slide shows

By choosing the commercial version, you can get other features, such as access to priority email support and an 8-hour response from business hours (ET). Learn more about RStudio version and features.

Install R & RStudio on CentOS 8 / RHEL 8

Now that we have introduced the basics of R and RStudio, we will now start the actual installation. Before continuing, please make sure the system has been updated.

sudo yum update

After the system is updated, add the EPEL repository:

--- CentOS 8 ---
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf config-manager --set-enabled PowerTools

--- RHEL 8 ---
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo ARCH=$( /bin/arch )
sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"

Install R on CentOS 8 / RHEL 8 Linux:

We will use automated scripts to install R on CentOS 8 / RHEL 8 Linux systems.

sudo bash -c "$(curl -L https://rstd.io/r-install)"

It will display all available versions of R, you can select a specific version from the list to install.

Available Versions
  3.6.3
  3.6.2
  3.6.1
  3.6.0
  3.5.3
  3.5.2
  3.5.1
  3.5.0
  3.4.4
  3.4.3
  3.4.2
  3.4.1
  3.4.0
  3.3.3
  3.3.2
  3.3.1
  3.3.0
  3.2.5
  3.2.4
  3.2.3
  3.2.2
  3.2.1
  3.2.0
  3.1.3
  3.1.2
  3.1.1
  3.1.0
  3.0.3
  3.0.2
  3.0.1
  3.0.0
Enter version to install: ( for latest)

To install the latest version, just click key.

Transaction Summary
========================================================================================================================================================
Install  30 Packages

Total size: 134 M
Total download size: 77 M
Installed size: 329 M
Is this ok [y/N]: y

Print the currently installed R version.

/opt/R/${R_VERSION}/bin/R --version

You can add the path of the R binary to $ PATH.

$ vim ~/.bashrc
export PATH=$PATH:/opt/R/${R_VERSION}/bin/R --version

Where $ {R_VERSION} Is the version of R you installed. In my case, this will be:

export PATH=$PATH:/opt/R/3.6.3/bin/

Obtain the bashrc file and confirm:

$ source .bashrc 
$ which R
/opt/R/3.6.3/bin/R
$ R --version
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
https://www.gnu.org/licenses/.

Install RStudio on CentOS 8 / RHEL 8:

Visit now RStudio download page Get the latest version of RStudio for RHEL / CentOS Linux.

sudo yum -y install wget
wget https://download1.rstudio.org/desktop/fedora28/x86_64/rstudio-1.2.5042-x86_64.rpm

Install the RPM software package downloaded using the yum or rpm command.

sudo yum localinstall ./rstudio-1.2.5042-x86_64.rpm

Agree to install RStudio on RHEL / CentOS 8 Linux.

Dependencies resolved.
======================================================================================
 Package           Architecture     Version              Repository              Size
======================================================================================
Installing:
 rstudio           x86_64           1.2.5042-1           @commandline           115 M

Transaction Summary
======================================================================================
Install  1 Package

Total size: 115 M
Installed size: 582 M
Is this ok [y/N]: y

Start RStudio from the CLI or desktop environment, and then start R development.

More development related content about CentOS / RHEL 8 Linux.

Install Apache Cassandra on CentOS 8 Linux

How to install Java 11 (OpenJDK 11) on RHEL 8 / CentOS 8

The
You can download this article in PDF format to support us through the following link.

Download the guide as a PDF

turn off
The

The
The

Sidebar