How to Install R on Ubuntu

How to Install and Use R on Ubuntu

  1. Installing R on Ubuntu
1sudo apt install r-base
  1. Interactive Mode in R:
1R

now you can test some code:

1> 25+25
2[1] 50
3
4> print ("Hello World!")
5[1] "Hello World!"

You can quit using q() or pressing CTRL+c.

  1. Use R by using RStudio - Download rstudio

Jupyter Notebook

  1. Install R in Jupyter Notebook:
1conda install -c r r-irkernel
  1. launch Jupyter Notebook
1jupyter notebook
  1. Create a new Notebook and select ‘R‘ from the drop-down list.

Posts in this Series