0

I updated R on Windows from version 3.2 to 3.4 and lost my packages. Now that I know this happens, I have found instructions on how to avoid this problem, but it's too late.

Is there any way to recover my old packages (wherever they are and whatever they were all called) and plug them back into the updated version of R?

Help would be greatly appreciated!

Spaniel
  • 329
  • 3
  • 15
  • This is really multiple questions, and there is sufficient information to answer neither of them. For your first (`NA` and `0`), we need to have sample data and code you're using. For the second (package library), it depends based on OS, old/new R versions, etc; this needs to be its own question. For your third (package dependency), `install.packages` automatically handles dependencies, so I have no idea what problems arose; did you try to reinstall `SWR2`? (I don't think it's on CRAN, so more info is required there, too.) – r2evans Mar 28 '18 at 18:43
  • The problem is not data nor function (NAs, 0). R versions, from what I can see, have been 3.2 and now 3.4 on Windows. And I just installed SWR2 the usual way (install.packages("WRS2")). Moreover, I have had a similar problem with ggplot2, wanting to do a mean graph with an error bar and the dependencies were not automatically installed (at least not the necessary package, but as I said, R told me to get that particular package. – Spaniel Mar 28 '18 at 18:48
  • Just reinstall the packages you need from CRAN with `install.pacakges()`. That will most likely give the most recent version of the package designed to work with that version of R. – MrFlick Mar 28 '18 at 19:28
  • Possible duplicate: https://stackoverflow.com/questions/3974488/after-i-upgrade-my-r-version-how-can-i-easily-reinstall-all-the-packages-that-w – MrFlick Mar 28 '18 at 19:29
  • MrFlick's link is an oft-asked question and related to your upgrade woes. Know that R differentiates package libraries by minor version ("3.4": 3 is major, 4 is minor), so upgrading from 3.2 to 3.4 results in a new (empty) library. If you are having problems with `install.packages` not installing the dependencies, we can't help much without seeing the commands and errors. – r2evans Mar 28 '18 at 19:43

0 Answers0