After upgrade to R 410, some PKGs don't work anymore in Rstudio...

Hi Community,

All my PKGS were working OK
in latest Rstudio 1.4.1103 /Linux,
until I upgraded yesterday to R V 4.1.0. :frowning:

Some pkgs still work OK inside Rstudio.

But other PKGs ONLY work
if R 410 is called from a Linux Terminal,
(ie: not from the Rstudio Console).

Inside Rstudio,
some PKGS give a big msg popup:
"Fatal Error!" (with a pic of a bomb and lit fuse!)

How do I install the latest Rstudio (f/Linux),
which works with this new installed R 4.1.0. ?.

Any way to go back to the previous Rstudio bliss,
(pre-R410 ) where all PKGS work ok?. :slight_smile:

SFdude
San Francisco
**R version 4.1.0 (2021-05-18) **
= latest R upgrade caused PKGs havoc in Rstudio!
latest Rstudio 1.4.1103
Ubuntu LINUX 20.04

1 Like

I believe that you should use the Preview version of RStudio for R 4.1

1 Like

**THANK YOU EconProf. **
Your suggestion WORKS!.

All my beloved R PKGS work again
inside Rstudio as before.

I learned my lesson...
always WAIT (weeks?, months?)
before you upgrade to the "latest" version of R.
It may break PKGS inside Rstudio...

Best to you from SF, (next door...) .
SFdude

Just to clarify, RStudio (which is just an IDE for the R programming language) has nothing to do with your R package library, your problem was that after a major R update, you need to update (which actually reinstalls) your packages so they get compiled for the current version, usually you do this by running this command:

update.packages(checkBuilt = TRUE)
3 Likes

When a new major version of R is installed in MacOS, a new folder for packages is created in the user's Library. That folder is empty, which means that your User Library in Rstudio is empty. I usually just install all my packages anew from the latest CRAN repo, which can be time consuming but seems to be the safest way. Given that SFdude had no problems when running R outside of RStudio, this is what I assumed he had done. Have you had a good outcome from copying the packages from the old library folder to the new one and running update.packages(), or is there a better way?

1 Like

You could even rename the folder or point your package library to the old location using the R_LIBS_SITE environmental variable but after a major R version update update.packages(checkBuilt = TRUE) is going to reinstall everything anyways because all packages require recompiling.

hi again EconProf and andresrcs,

I actually followed your advice yesterday,
and installed the PREVIEW version of Rstudio,
V 1.4.1714
from:

Everything started working again immediately!.
The Rstudio PREVIEW version
"accepts" the new R version 1.4!. ::

I did not need to reinstall
any PKGs, at this point.

So far,
with the Rstudio PREVIEW version,
all is bliss again!. :slight_smile:

Thanks to ALL for helping.
You are the BEST!.

SFdude
San Francisco
**R version 4.1.0 (2021-05-18) **
latest Rstudio 1.4.1714 PREVIEW "Juliet Rose"
Ubuntu LINUX 20.04

Is not my intention to antagonize you but this comment can be misleading to other people reading it. as I said before, RStudio is just an IDE for the R programming language, the version you are using doesn't affect your R package library, it's compatibility with an specific R version is a different matter.

1 Like

Hi Andres,

Thank you for that.
Yes, I immediately deleted that paragraph.

Appreciate your great help!
SFdude

This topic was automatically closed 7 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.