Hi all, apologies for the noob question. I've been asked to upgrade r on our environment (1 workbench, 1 connect, 1 pm). Our current R Version is 4.2.3, I've been asked to upgrade to 4.4. Questions are:
what are all of the commands to run the upgrade on an Ubuntu 20.04 box. (I know, I'm learning
Would this be run on the workbench and connect box? All three?
To confirm update successful, I'd check /opt/R/ and confirm that there's a 4.4 folder, as well as check the Console dropdown to confirm that 4.4 is available?
Thanks!
For R itself, rather than RStudio, you'll need to visit the R Project. If you go to any CRAN mirror, you'll see links to " Download R for Linux" (with specific links to a handful of common distributions, including Ubuntu), at the top of the page.
To check your current version of R (and that it's in your $PATH appropriately), I'd suggest opening a terminal window and entering R --version --- it'll also show at the top of the console in RStudio or if you open the R GUI.
(Unfortunately I do not know the answer to your second question, though I would imagine if they are able to draw on the same $PATH it is not necessary, but if you have separate binaries for each one, it will be.)
Alternatively you also could simply use the Posit provided R binaries you can download at Install R – Posit Docs.
These packages do have the benefit that you can install multiple versions of R concurrently and all Posit Products will automatically detect theses R versions.
You will only need to install R 4.4 on Connect and Workbench - Package Manager is happy with whatever R version it can get - if at all, R is used only for git builders on package managers which by default only build R source packages.
Thanks @swiderskiji, I think my confusion stems from
admin@rserver:~$ R --version --
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
However, /opt/R/ contains the 4.4.0 folder, and the console dropdown included 4.4 (after restarting rstudio).
I've only installed on the Workbench server so far. I'm going to wait for tester feedback before installing on Connect.
Thanks for your help. I'll likely have some more and similar noob questions regarding python
The conundrum on why command line R --version reports 3.6.3 while you clearly installed R 4.4.0 in /opt/R is caused by the following: R Version 3.6.3 has been installed as part of the general operating system and hence the R binary ended up in an accessible path (see PATH environment variable). /opt/R/4.4.0/bin is defined nowhere in PATH and hence the command line only finds R 3.6.3 (with the R binary located in /usr/bin. Workbench however will automatically search and discover R versions in /opt/R and hence find 4.4.0 although it is not part of PATH.
If you wanted to make R 4.4.0 system default, you could create a symbolic link into /usr/local/bin like