Upgrading R from 3.4.3 to 3.5


#1

HI am new to R upgrade, could you please let us know what will be the process to upgrade R from R --version 3.4.3 to R -- version 3.5.0 on RHEL7

Please let us know if any backup plan for up gradation fails or new version fails to work


#2

We highly recommend that you install multiple different versions of R side-by-side. This is the only way to ensure scripts that were written for one version of R don't inadvertently break when upgrading to new version of R. (Your base R code will likely still work, but new versions of packages may very well have different APIs.)

To install R side-by-side, you must install R from source. You can refer to these resources:

The process is actually really straight forward, and if you haven't done this before, I suggest following the steps in the RStudio Admin guide.

Some further advice:

  • Follow the advice in the support article "Managing libraries for RStudio Server" on how to manage system and user libraries for R packages. We strongly recommend you allow users to install R package in a user library.

#3

Thanks andrie for your help

Is there any possibility of revert back the R upgrade from 3.5 to 3.4.3 if it is already upgraded


#4

That's an interesting request. Are you trying to support older Shiny apps or RStudio projects? I think you'll find that rolling back installs of R to be problematic. @andrie is correct, you should build R from source. It's really not very hard. I would refer you to this article for getting started:

Nathan


#5

There is no R3.4.3 source package present in Cran repository,is there any way to get the R3.4.3 version to install that from scratch.
If so please provide the location or url


#6

You can find the source code for R in the source archives at https://cran.r-project.org/src/base/.

I use the recommended installation instructions from the RStudio Connect admin pages, as I said in my earlier response. This is the script I use:

apt-get update
apt-get build-dep r-base -y

wget https://cran.r-project.org/src/base/R-3/R-3.4.3.tar.gz
tar -xzvf R-3.4.3.tar.gz
cd R-3.4.3

./configure \
  --prefix=/opt/R/$(cat VERSION) \
  --enable-memory-profiling \
  --enable-R-shlib \
  --with-blas \
  --with-cairo=yes \
  --with-lapack \
  --with-libpng=yes \
  --with-x

make; make install

#7

Hi Andrie,

Thanks for your help.

after installing 3.4.3, if i install curl or xml2 or some other packages from cran,it will install latest version

does R-3.4.3 will support latest version of those packages ?


#8

Yes. curl depends on R >=3.0 and xml depends on R >= 2.13. Should you ever need older sources, you can access them by clicking on Old sources in their respective CRAN pages.


#9

Hi Nathan

Thanks for your reply.

in one othe server R3.5 is installed in /opt/shiny-server if i need to install older version where i need to install R3.4.3.

if we need to install in same folder where R3.5 installs does it create any issue?

Please suggest on this


#10

Hi Nathan
i installed R3.4.3 but when i am running sudo R -e "install.packages....
its throwing error sudo R command not found

Please help me on this.


#11

A post was split to a new topic: RStudio server pro admin guide (section 5.10.1) mentions changing the default user library... discussion