We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – Install R & RStudio on CentOS 8 / RHEL 8 Linux

Learn how to – Install R & RStudio on CentOS 8 / RHEL 8 Linux.

Welcome to our guide on how to install R & RStudio on CentOS 8 / RHEL 8 Linux. R is a popular programming language used for graphical representation of data and statistical computing. If you are a full time R developer, you’ll need a version of IDE. This is where RStudio come in. RStudio is a set of integrated tools designed to help R developers be more productive and efficient.

Rstudio comes with robust tools for plotting, viewing history, debugging and managing your workspace. Two versions of RStudio are available – open source or commercial. Pick the version that works best for your business needs.

Features of RStudio

  • 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 editor
  • Quickly jump to function definitions
  • Easily manage multiple working directories using projects
  • Integrated R help and documentation
  • Interactive debugger to diagnose and fix errors quickly
  • Extensive package development tools
  • Support for interactive graphics with Shiny and ggvis
  • Supports authoring HTML, PDF, Word Documents, and slide shows

By choosing the commercial edition, you get additional features such as Access to priority email support and 8 hour response during business hours (ET). Learn more about RStudio editions and features.

Install R & RStudio on CentOS 8 / RHEL 8

Now that we’ve covered the basics of R and RStudio, let’s now proceed to actual installation. Ensure the system is updated before you continue.

sudo yum update

Once the system is updated, add the EPEL repositories:

### 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’ll use an automated script to install R on CentOS 8 / RHEL 8 Linux system.

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

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

Available Versions
  devel
  4.1.2
  4.1.1
  4.1.0
  4.0.5
  4.0.4
  4.0.3
  4.0.2
  4.0.1
  4.0.0
  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: (<ENTER> for latest)

To install the latest version, just hit the <Enter> 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

List installed versions of R:

$ ls /opt/R/
4.1.2  devel

Print the current version of R installed.

$ /opt/R/RVERSION/bin/R --version
# Example
$ /opt/R/devel/bin/R --version
$ /opt/R/4.1.2/bin/R --version

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

$ vim ~/.bashrc
export PATH=$PATH:/opt/R/RVERSION/bin/

Where RVERSION is the version of your R installed. In my case this will be:

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

Source the bashrc file and confirm:

$ source .bashrc 
$ which R
/opt/R/devel/bin/R
$ R --version
R Under development (unstable) (2021-11-03 r81137) -- "Unsuffered Consequences"

Install RStudio on CentOS 8 / RHEL 8:

Now visit the  RStudio downloads page to grab the latest release of RStudio for RHEL / CentOS Linux.

sudo yum -y install wget
wget https://download1.rstudio.org/desktop/centos7/x86_64/rstudio-2021.09.0-351-x86_64.rpm

Install the RPM package downloaded using yum or rpm command.

sudo yum localinstall ./rstudio-2021.09.0-351-x86_64.rpm

Agree to install RStudio on RHEL / CentOS 8 Linux.

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

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

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

Launch RStudio from CLI or Desktop environment and start your R Development.

More Dev related content for CentOS / RHEL 8 Linux.

Cart

Your Cart is Empty

Back To Shop