This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to update R on ubuntu

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?

installation update r apt-get

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 executable R:

 $dpkg -L r-base 
 /. 
 /usr 
 /usr/share 
 /usr/share/doc
 /usr/share/doc/r-base /usr/share/doc/r-base/README.Debian
 /usr/share/doc/r-base/changelog.Debian.gz
 /usr/share/doc/r-base/copyright

0 answers

No answers yet.

Log in to answer this question.