0

I have updated my R version from 3.6 to 4.0.3. Is there a way I can keep all the old packages under 3.6 in 4.0.3 version? I copied all the packages from 3.6 to 4.0.3 and ran

update.packages(ask=FALSE, checkBuilt = TRUE)

I am still getting errors and R studio once closed does not open up. What is the best way to get all my old packages to work with R new version.

Thanks

Phil
  • 7,287
  • 3
  • 36
  • 66
user3138373
  • 519
  • 1
  • 6
  • 18
  • 2
    I would strongly recommend against copying files directly over into the new directory. You could run `dput(rownames(installed.packages()))` in your old version of R to get a character vector of all installed packages. and then run `install.packages(...)` with that character vector in your new R (assuming all packages came from CRAN). For more specific help, you should include specific errors that you are getting. – MrFlick Nov 11 '20 at 18:27
  • I have already installed R version 4 now. And when I launch R studio, it shows the latest version(4.0.3). so how can I now use old R version so that I can use `dput(rownames(installed.packages()))` – user3138373 Nov 11 '20 at 18:33
  • Just don't use RStudio. The R GUI for your old version will be on your computer somewhere (it doesn't get removed by default). I'm not sure what OS you are using, but just open the correct R application however you normally would. – MrFlick Nov 11 '20 at 18:37
  • I am using Mac OS and yes the previous version is present here `/Library/Frameworks/R.framework/Versions/3.6/Resources/library`. I am reading about rswitch which switch between versions – user3138373 Nov 11 '20 at 18:39

0 Answers0