We ever discussed How To Install R and RStudio Server in Ubuntu Linux 20.04. If the purpose is to install a local RStudio IDE instead of a remote RStudio Server, we can install RStudio Desktop.
In this post, we introduce how to install R and RStudio Desktop on Ubuntu Linux 20.04. For other Ubuntu version, the steps are similar. But make sure to download the RStudio Desktop package for that version of Ubuntu Linux.
Install R environment
Install R environment as follows (for more details, please check Install R environment in Ubuntu Linux) as follows.
$ sudo apt update $ sudo apt install r-base
Install RStudio Desktop on Ubuntu
After the R environment is ready, we can move to to install the RStudio Desktop.
First, download the RStudio Desktop software package by (here, we use version 1.3.1093 as an example, you need to find the link for the specific version you want to install and use that link in the command line below)
$ wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.3.1093-amd64.deb
Then, install the deb package as follows (again, we use the 1.3.1092 as the example. If you are using a different version, change the command to match the file name you downloaded in the previous step).
$ sudo apt install ./rstudio-1.3.1093-amd64.deb
It should print output as follows.
Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'rstudio' instead of './rstudio-1.3.1093-amd64.deb' The following NEW packages will be installed: rstudio 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/127 MB of archives. After this operation, 844 MB of additional disk space will be used. Get:1 /home/davidyang/Downloads/rstudio-1.3.1093-amd64.deb rstudio amd64 1.3.1093 [127 MB] Selecting previously unselected package rstudio. (Reading database ... 267829 files and directories currently installed.) Preparing to unpack .../rstudio-1.3.1093-amd64.deb ... Unpacking rstudio (1.3.1093) ... Setting up rstudio (1.3.1093) ... Processing triggers for desktop-file-utils (0.24-1ubuntu3) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for shared-mime-info (1.15-1) ...
Verify the R and RStudio Desktop installation
Start RStudio Desktop by opening the RStudio program from the application launcher or application menu, or by running the command
Then the RStudio Desktop window will show. In the Console panel, let’s run some demos and verify the environment:
Hit Enter to start the demos. The results and plot will shows as follows.