I've recently acquired a machine with Ubuntu 18.04 on it. I installed R simply with:
sudo apt-get install r-base
And when I call $ R in console, it starts up with:
R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
...
I'd like to get R 3.6 installed, primarily because I need BiocManager and a bunch of latest versions of other R packages obtained through BiocManager. I've followed the steps here, so now my /etc/apt/sources.list/ looks like (just the bottom bit that's relevant):
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
deb https://cloud.r-project.org/bin/linux/ubuntu trusty-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
And ran sudo apt-get install r-base again.
But when I run $ R from the console again, I still see:
R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
...
Is there something I'm missing? I'm new to setting up R and Linux in general, so I sense that there's a bunch of literature I'm missing about what's available via apt-get, R versioning for Ubuntu, and so on. Any links to useful man pages would also be very helpful.
Edit: Following the comments:
Ran:
sudo apt update
sudo apt-get install r-base
To no new effect; callnig R from console still brings up R v3.4.4.
apt-cache policy r-base shows:
r-base:
Installed: 3.4.4-1ubuntu1
Candidate: 3.4.4-1ubuntu1
Version table:
*** 3.4.4-1ubuntu1 500
500 http://au.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
500 http://au.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
100 /var/lib/dpkg/status
Which I assume means R v3.6 isn't even being installed at all?