Hi,
I installed an R package which was already installed and it overwrote my previous R package (that had data in it). How should i retrieve my previous R package?
Thanks
Hi,
I installed an R package which was already installed and it overwrote my previous R package (that had data in it). How should i retrieve my previous R package?
Thanks
Just to bring closure to this thread - this is essentially WouterDeCoster comment above, with a bit more of detail.
You can get / check your packages library tree with .libPaths()
. If you install packages without specifying a location, they are installed at the first element of .libPaths()
. When a newer version of the package is installed, the old version is completely wiped out, and no recovery of the old version is possible. Your only chance of recovering the old data is if the newer version has been installed at a different location at the packages library tree. For example, in my computer:
.libPaths()
[1] "/home/h.mon/R/x86_64-pc-linux-gnu-library/3.5" [2] "/usr/local/lib/R/site-library" [3] "/usr/lib/R/site-library" [4] "/usr/lib/R/library"
So there are four possible places to search for the old package. Anyway, it is unlikely the package will be at a different location than your personal R library (the one at your /home folder), the "/usr/local" and "/usr/lib" are system-wide installs and need administrator privilege.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
R packages do generally not have user data in there - and I don't think you would overwrite it by installing a new version. Can you elaborate and be more specific?
Thanks for your response. I have put some data myself on extdata folder which had example files to run. I installed again using biocLite as a package was missing. But i cannot find my data now.
Right. That maybe wasn't the best place for you to save data. I don't think recovery is possible - but I'm not an expert in R packages so we can wait a little longer to see if someone has a different idea.
Ok...Thank you for the help.
Provide more details, what package is it? How did you save your data, share the code? Output of
sessionInfo()
would help.Thank you for the help. I think i will be able to find the data in backup. Cheers.