How can I upgrade to R 4.2 on Amazon Linux (Centos)

With ssh connection:

 R --version
R version 4.1.1 (2021-08-10) -- "Kick Things"

I want 4.2 to be able to use placeholder _ in native pipe.

Tried following instructions here:

export R_VERSION=4.2.1
curl -O https://cdn.rstudio.com/r/centos-8/pkgs/R-${R_VERSION}-1-1.x86_64.rpm
sudo yum install R-${R_VERSION}-1-1.x86_64.rpm

Looked like it installed:

curl -O https://cdn.rstudio.com/r/centos-8/pkgs/R-${R_VERSION}-1-1.x86_64.rpm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67.2M  100 67.2M    0     0  25.0M      0  0:00:02  0:00:02 --:--:-- 24.9M
[ec2-user@ourdomain ~]$ sudo yum install R-${R_VERSION}-1-1.x86_64.rpm
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Examining R-4.2.1-1-1.x86_64.rpm: R-4.2.1-1-1.x86_64
Marking R-4.2.1-1-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package R-4.2.1.x86_64 0:1-1 will be installed
--> Finished Dependency Resolution
amzn2-core/2/x86_64                                                      | 3.7 kB  00:00:00     

Dependencies Resolved

================================================================================================
 Package             Arch               Version           Repository                       Size
================================================================================================
Installing:
 R-4.2.1             x86_64             1-1               /R-4.2.1-1-1.x86_64             117 M

Transaction Summary
================================================================================================
Install  1 Package

Total size: 117 M
Installed size: 117 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Verifying  : R-4.2.1-1-1.x86_64                                                           1/1 

Installed:
  R-4.2.1.x86_64 0:1-1                                                                          

Complete!

But, when I run r version again:

R --version
R version 4.1.1 (2021-08-10) -- "Kick Things"

It's 4.1 and not 4.2 as desired.

How can I get up to version 4.2?

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.