Installing R & RStudio on Kubuntu 20.10 Desktop using apt-get install r-base-dev

Step 1:

Download the font from here:

Extract the archive and install the font. This can be done most easily by double-clicking the font file.

Step 2:

Launch the commands apt-get update and apt-cache showpkg r-base:

root@VM-KU2010D:/home/you# apt-get update
Hit:1 groovy InRelease
Get:2 groovy-updates InRelease [110 kB]
Hit:3 groovy-security InRelease 
Get:4 groovy-backports InRelease [101 kB]
Get:5 groovy-updates/main amd64 DEP-11 Metadata [24,1 kB]
Get:6 groovy-updates/universe amd64 DEP-11 Metadata [15,0 kB]
Get:7 groovy-backports/universe amd64 DEP-11 Metadata [600 B]
Fetched 251 kB in 1s (281 kB/s) 
Reading package lists... Done
root@VM-KU2010D:/home/you# apt-cache showpkg r-base 
Package: r-base
4.0.2-1build1 (/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_groovy_universe_binary-amd64_Packages) (/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_groovy_universe_binary-i386_Packages)
Description Language: 
File: /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_groovy_universe_binary-amd64_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
Description Language: en
File: /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_groovy_universe_i18n_Translation-en
MD5: 5787ca79ed716232c4cc2087ed9b425b

Reverse Depends: 
r-base-core,r-base 1.4.1-1
r-doc-info,r-base 1.4.1-1
r-doc-html,r-base 1.4.1-1
r-base-html,r-base 1.4.1-1
4.0.2-1build1 - r-base-core (2 4.0.2-1build1) r-recommended (5 4.0.2-1build1) r-base-html (0 (null)) r-doc-html (0 (null)) elpa-ess (0 (null)) r-doc-info (16 (null)) r-doc-pdf (0 (null)) 
4.0.2-1build1 - 
Reverse Provides: 

At the time of this writing R v4.0.3 is the latest one. If you want the somewhat earlier version you may install it now using apt-get install r-base.

To install the newer one, do the following:

sudo apt-key adv --keyserver --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

The command is deprecated but it still works.

sudo add-apt-repository 'deb groovy-cran40/'

Install it with apt-get install r-base.

In the following I go with R v4.0.3 BUT I choose r-base-dev! Hence, the following may or may not apply exactly to what you experience if you stay with r-base. In addition I install r-base-core-dbg and r-base-html.

Next comes RStudio.

apt-get install libclang-dev

This is required by RStudio !

If you receive a hint to perform

apt --fix-broken install

do so! Now download the deb package for your system:

and install it:

dpkg -i <your package>

You can now start RStudio via the menu. First of all, I install the packages ggplot2 und ggthemes, and this works right away. I test it with the faithful dataset which is provided by RStudio for testing purposes:

> library(ggplot2)
> library(ggthemes)
> ggplot(faithful) + geom_point(aes(x=eruptions,y=waiting),shape='square')
> ggplot(faithful) + geom_point(aes(x=eruptions,y=waiting),shape='square') + theme_bw()
> ggplot(faithful) + geom_point(aes(x=eruptions,y=waiting),shape='square') + theme_dark()
> ggplot(faithful) + geom_point(aes(x=eruptions,y=waiting),shape='square') + theme_economist()

Works! Work done!






A Website.