R packages with RStudio new version

Hi.
I updated RStudio to use the new version of R (4.2.0); Windows 10.
After that I updated R to new version 4.2.0 and I chose to get the pacakges from the older version but the packages doesn't appear in RStudio packages tab. Only the system packages are showed.
Any tips?
Thanks.

Hi @betobon - I had a similar problem. R 4.2.0 on windows changes the default personal packages library:

The default personal library on Windows, folder ‘R\win-library\x.y’ where ‘x.y’ stands for R release ‘x.y.z’, is now a subdirectory of Local Application Data directory (usually a hidden directory ‘C:\Users\username\AppData\Local’). Use shell.exec(.libPaths()[1]) from R to open the personal library in Explorer when it is first in the list (PR#17842).

I don't know how you pointed it to the old packages but maybe this is the cause?

Also see this - potentially related - issue: RStudio no longer working after upgrade to R 4.2.0 - #4 by andresrcs

Hi. I update R through "installr" package so there are some questions with options during the update process. One is "do you want to copy the packages from older version? Yes or No"... This time didn't work. I uninstall the R version 4.2.0 an return to use the oder one 4.1.3. The packages back to normal.

Yes I saw this topic but I did not have this problem because I update RStudio first.

I am not a user of installr but with a major version bump of R one needs to make sure that update.packages is run with checkBuilt=TRUE. From the source code of installr that should to be the case: installr/updateR.R at eb2bdc3a175718850fd33c4abbcefa1f905d2f4f · talgalili/installr · GitHub. You could try manually calling update.packages(checkBuilt=TRUE,ask=FALSE). The point is that .libPaths() has changed and that maybe installr is not yet up-to-date with this change when copying the files (the latest commit to the github was on 30/3, R 4.2.0 was released on 22/04)

Thank you.
Another way to try to copy the packages to a new device that I found on R-bloggers:

quick-way-of-installing-all-your-old-r-libraries-on-a-new-device

Maybe this solution works in the same device to copy packages.
Regards.

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