Entering edit mode
7 months ago
Bosberg
▴
50
I'm trying to update to the latest version of R on Ubuntu with the following command:
$sudo apt-get -y install r-base
...
Reading package lists... Done
Building dependency tree
Reading state information... Done
r-base is already the newest version (4.4.0-1.2004.0).
The following packages were automatically installed and are no longer required:
...
I've done this many times and it always says that I should already be at version 4.4, but when I check what version is actually running I see this:
$R --version
R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
i.e. an older version from 2022 (that is incompatible with some newer software that I need to install). To see which one is running I used the following:
$which R
/usr/local/bin/R
I guess apt is installing somewhere else? I don't know how to check where it's going. Any idea how I should properly update my version of R?
You can check where the application was installed using: https://unix.stackexchange.com/questions/39590/apt-get-install-where-does-it-go
Then amend your $PATH to point to the R version you want to use.
Thanks for the suggestion, but I get several lines of results (see below) and although there are directories called
"R"
, I can't find any executableR
: