I can't open "car" library in r - r

I tried updating r, uninstalling and reinstalling, but I couldn't fix the problem.
This is what it is happening:
install.packages("car")
Installing package into ‘C:/Users/COMPAQ/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified) probando la URL
'https://cran.rstudio.com/bin/windows/contrib/4.0/car_3.0-10.zip'
Content type 'application/zip' length 1561252 bytes (1.5 MB)
downloaded 1.5 MB
package ‘car’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Public\Documents\Wondershare\CreatorTemp\RtmpymBNDV\downloaded_packages
library(car)
Error: package or namespace load failed for ‘car’ in get(Info[i, 1],
envir = env): no fue posible abrir el archivo
'C:/Users/COMPAQ/Documents/R/win-library/4.0/abind/R/abind.rdb': No
such file or directory

You need to install the abind package as well (and perhaps other packages as well), which is only listed under Imports in the Description file of the car package
install.packages("abind")
or
install.packages("car", dependencies = "Imports")
should work.

Related

Dependency limma not available when installing MKmisc package

When installing this package in R 4.2.1
install.packages("MKmisc")
I have this output
Installing package into ‘C:/Users/blahblah/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘limma’ is not available
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/MKmisc_1.8.zip'
Content type 'application/zip' length 769544 bytes (751 KB)
downloaded 751 KB
package ‘MKmisc’ successfully unpacked and MD5 sums checked
It does not work as we need to download the package limma so let's do it
install_github("cran/limma")
However it gives an error and the MKmisc package is still not working
What should I do to handle this problem?
"limma" can be installed using BiocManager.
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("limma")
install.packages("MKmisc")
# * DONE (MKmisc)
# The downloaded source packages are in
# ‘/tmp/Rtmphwh6rY/downloaded_packages’

Can't install caret package

I'm not sure what's happening here but the caret package is not installing properly. I realize similar problems have been posted before but I can't figure it out.
install.packages("caret")
library(caret)
Error: package or namespace load failed for ‘caret’ in get(Info[i, 1], envir = env):
cannot open file 'C:/Users/John Compton/Documents/R/win-library/3.6/MASS/R/MASS.rdb': No such file or directory
So I've been trying to figure this out. I have the fully updated R 3.6.1, I also ran a thing that I've since lost of like install.packages("caret", repos = "cran/....", c = ("Dependencies", "Suggestions")) which took about 30 minutes and installed like every suggested package, so I don't know what the error could be. How do I fix the error with this package?
Edit: To include the install.package call
> install.packages("caret")
Installing package into ‘C:/Users/John Compton/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/caret_6.0-84.zip'
Content type 'application/zip' length 6237886 bytes (5.9 MB)
downloaded 5.9 MB
package ‘caret’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\John Compton\AppData\Local\Temp\RtmpGuKafa\downloaded_packages
>

package or namespace load failure

I don't know what happened but this NAMESPACE LOAD FAILURE is coming every time I call the forecast package.
So I have used this line of code
install.packages("forecast",repos = c("http://rstudio.org/_packages",
"http://cran.rstudio.com"))
This was the console message that I got after running this code
Installing package into ‘C:/Users/adarsh/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository
http://rstudio.org/_packages/bin/windows/contrib/3.5:
cannot open URL
'http://rstudio.org/_packages/bin/windows/contrib/3.5/PACKAGES'
There is a binary version available but the
source version is later:
binary source needs_compilation
forecast 8.6 8.7 TRUE
Binaries will be installed
trying URL
'http://cran.rstudio.com/bin/windows/contrib/3.5/forecast_8.6.zip'
Content type 'application/zip' length 2345112 bytes (2.2 MB)
downloaded 2.2 MB
package ‘forecast’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\adarsh\AppData\Local\Temp\RtmpQ58pju\downloaded_packages
I checked whether this was also the case with other packages.
install.packages("tseries")
Installing package into ‘C:/Users/adarsh/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘quadprog’ is not available
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tseries_0.10-46.zip'
Content type 'application/zip' length 414767 bytes (405 KB)
downloaded 405 KB
package ‘tseries’ successfully unpacked and MD5 sums checked**
**The downloaded binary packages are in
C:\Users\adarsh\AppData\Local\Temp\RtmpQ1vu1H\downloaded_packages**
library(tseries)
Error: package or namespace load failed for ‘tseries’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘quadprog’
In addition: Warning message:
package ‘tseries’ was built under R version 3.5.3
Same error happened again. Please anyone help me.
I downloaded the " quadprog " package from the cran repository and saved it as zip file at C://Users/yourname/Documents/package_file.zip .
Then used the option Package Archive File (.zip; .tar.gz) in R studio and installed the above package.
Thank you

There is a error while loading the library gmodels

> install.packages("gmodels",dependencies = TRUE)
Installing package into ‘C:/Users/OmPrakash/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/gmodels_2.16.2.zip'
Content type 'application/zip' length 74193 bytes (72 KB)
downloaded 72 KB
package ‘gmodels’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in :
C:\Users\OmPrakash\AppData\Local\Temp\RtmpO6JFcq\downloaded_packages
> library(gmodels)
Error: package or namespace load failed for ‘gmodels’ in library.dynam(lib, package, package.lib):
DLL ‘gtools’ not found: maybe not installed for this architecture?
It seems like gtools is not well installed.
You should try manually installing it.
Colin

Unable to load packages

I was trying to install lubridate package but cannot manage to load it to my library
Here are the errors I got.
install.packages("lubridate")
Installing package into ‘C:/Users/YingHaw/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/lubridate_1.3.3.zip'
Content type 'application/zip' length 664643 bytes (649 KB)
opened URL
downloaded 649 KB
package ‘lubridate’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\YingHaw\AppData\Local\Temp\Rtmp4KMRy3\downloaded_packages
library(lubridate)
Error in get(Info[i, 1], envir = env) :
cannot open file 'C:/Users/YingHaw/Documents/R/win-library/3.1/Rcpp/R/Rcpp.rdb': No such file or directory
Error: package or namespace load failed for ‘lubridate’
I don't understand why I am having this problem.

Resources