How to Install R on Debian 10
Install R on Debian 10
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 Debian 10.
Before you start to install R on Debian. You must have a non-root user account on your server with sudo privileges.
Installing R on Debian
R language repository is not available in Debian core repositories so we need to add the repository manually. Follow below instructions to add repository and install R on Debian.
First add GPG key by using the following command in terminal:
sudo apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'
Now after adding GPG key you should add the repository by running the below command:
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/debian stretch-cran35/'
Update the apt package manager index by typing the following command in terminal:
sudo apt update
Run the following command to install R in Debian:
sudo apt-get install r-base
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-09-01) -- "Feather Spray" Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) ... Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.
Run Simple Hello World Program In R
Now we are going to run a simple R program in Debian 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 Debian 10. If you have any queries please don’t forget to comment out.
How to Disable SELinux on CentOS 8
How to Install PhpStorm on Debian 9
How to Install RubyMine on Debian 10
How to Install WordPress with LAMP Stack on CentOS 8
How to Install Skype on CentOS 7
How to Install Google Chrome on Ubuntu 18.04
How to Install FFmpeg on Linux Mint 19
How to Install Android Studio in Linux
How to Install Google Chrome on Debian 10
How to Install Django Web Framework on CentOS 7
How to Install PHP on Debian 9
How to Install XAMPP on Manjaro 18