Hi-
I am sorry, but I'm not sure. I've tried it on my system, and things worked.
I removed R with:
sudo apt-get remove r-base-core
Then, this is what the end of my /etc/apt/sources.list file looks like, if that is useful (though, note that this forum format will change the full links to the abbreviations, that you will have to see by clicking on them):
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb [archive.canonical.com] bionic partner
# deb-src [archive.canonical.com] bionic partner
deb [security.ubuntu.com] bionic-security main restricted
# deb-src [security.ubuntu.com] bionic-security main restricted
deb [security.ubuntu.com] bionic-security universe
# deb-src [security.ubuntu.com] bionic-security universe
deb [security.ubuntu.com] bionic-security multiverse
# deb-src [security.ubuntu.com] bionic-security multiverse
deb [cran.cnr.berkeley.edu] bionic/
deb [cloud.r-project.org] bionic-cran35/
After that, I ran:
sudo apt-get update
so the manager could see the changes.
Then:
sudo apt-get install -y r-base-dev
to install R, which should be some v3.5.* now.
Then,
rPkgsInstall -pkgs ALL
... and that updated the new packages.
--pt