How to Install R on CentOS 7
Install R on CentOS 7
R is a opensource programming language and software environment which comes with GUI (Graphical User Interface). R language specialized in statistical computing and graphics so it is widely used in statistical software development and data analysis. In this tutorial we are going to learn How to install R on CentOS 7.
Before you start to install R on CentOS. You must have a non-root user account on your server with sudo privileges.
Installing R on CentOS
R language repository is available in CentOS EPEL repositories so we need to add the repository. Follow below instructions to add repository and install R on CentOS.
Install CentOS EPEL repository by using following command:
sudo yum install epel-release
Run the following command to install R in CentOS:
sudo yum install R
Confirm the installation and check the version of R language by typing the following command:
The output should be:
R version 3.5.3 (2019-04-03) -- "Joy in Playing" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-redhat-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 http://www.gnu.org/licenses/.
Run Simple Hello World Program In R
Now we are going to run a simple R program in CentOS using following instructions.
Create a file named
HelloWorld.R using the following command:
sudo nano HelloWorld.R
Copy and paste the following code in above file:
helloVariable <- "Hello World" print(helloVariable)
Now run program by typing the following command in the terminal:
The output should be:
 Hello World
You have successfully run Hello World program in R language.
You have successfully learned how to install R on CentOS 7. If you have any queries please don’t forget to comment out.
How to Mount and Unmount Filesystems in Linux with Examples
How to Install Sublime Text 3 on Debian 9
How to Install PyCharm on Linux Mint 19
How to Check CentOS Version
How to Install Postman on Ubuntu 18.04
How to Install Mozilla Firefox on Ubuntu 18.04
How to Install XAMPP on Fedora 29
How to Install Google Chrome on Fedora 29
How to Install MariaDB on Fedora 29
How to Install Papper Flash on Linux Mint 19
How to Install Apache on Ubuntu 18.04
How to Install Opera Browser on Linux Mint 19