Installing some library twice in R [duplicate] - r

This question already has answers here:
How do you use multiple versions of the same R package?
(3 answers)
Closed 4 years ago.
I wonder, can I do any harm to my system (or the stability of R installation) if I install some package twice. Or when installing a new package it will simply overwrite the previous version.

Happens to me all the time that I execute install.packages on something that I have installed before. You just get a warning.

Related

Installing an old version of lme4 package in R [duplicate]

This question already has answers here:
How do I install an R package from the source tarball on windows?
(6 answers)
Closed 4 years ago.
I am struggling to install the 1.1-13 version of lme4 package in R. I went to https://cran.r-project.org/src/contrib/Archive/lme4/ . But I am not understanding the next step after downloading lme4_1.1-13.tar.gz. What should I do next?
Thanks in advance.
You do the follow:
install.packages("path_to_file/lme4_1.1-13.tar.gz", repos = NULL, type="source")
Or in the terminal:
R CMD INSTALL lme4_1.1-13.tar.gz
This second way will not work if the needed system tools for compilation are not present.

Warning in install.packages : cannot remove prior installation of package ‘data.table’ [duplicate]

This question already has answers here:
R package updates
(4 answers)
Closed 4 years ago.
I tried to install package data.table in R. This error showed up. Could anyone resolve this?
I assume you're on Windows. You may have data.table loaded into your session already; on Windows, dlls that are part of a package can't be unloaded until R shuts down. So restart R and then try running install.packages again.
Try running R with admin access (sudo in Linux, or for Windows, right click and choose "Run as Administrator"). I had the same problem when running R from PowerShell in Windows, and this fixed it.

Can I make R install packages automatically? [duplicate]

This question already has answers here:
Check if R package is installed then load library
(6 answers)
Closed 6 years ago.
When running a script with new libraries, I will automatically respond to the error message Error in library(x) : there is no package called ‘x’ with install.packages("x"). Is there a way to automate this process?
if(! require("x")) install.packages("x")
but see Check if R package is installed then load library for more robust solutions

cannot install plyr package in R [duplicate]

This question already has answers here:
How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?
(18 answers)
Closed 8 years ago.
I tried installing the plyr package and I got the warning message saying it isn't available for R version 3.0.2. Is this true or is no? If not, why would I be getting this message? I tried using two different CRAN mirrors and both gave the same message.
The answer is that the package is available in R (just checked this on my machine).
The particular error message that you are getting is very misleading. It is R's `catch-all' condition for anything that it doesn't understand going wrong during installation. You will get this error if you mis-spelled anything (Plyr instead of plyr) or your network connection is not working, or you are behind a proxy or whatever.
I typically get this problem when I am behind a proxy or I have mis-spelled something. But it can be because of any other number of reasons. I will suggest you make sure you can access the internet from inside R first.
If nothing works, you can always download the package from CRAN using a browser. If you are on Windows, you want the .zip version and if you are on *nix you want the .tar.gz version. (.tgz for Macs?). Then you can install it like so:
setwd("/path/where/I/downloaded/the/compressed/file")
install.packages("plyr", repos=NULL)
See if that works.

How do I install an older R package? [duplicate]

This question already has answers here:
Installing older version of R package
(8 answers)
Closed 7 years ago.
I am trying to install the R package bigrf using the following command:
install.packages('bigrf')
However, I receive this error:
Warning in install.packages: package 'bigrf' is not available (for R version 3.0.2).
I understand that the package was not built for R version 3.0.2, but is it not possible for me to install it regardless with the understanding that it might not have complete forward compatibility?
The safest thing to do would be to download the last version that the package was built for (link) and run the code on that version.
The easiest way to rebuild a package from source is using R-Studio.
They have a good walkthrough. You will need to use the devtools package as well.

Resources