Unable to load packages - r

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.

Related

I can't open "car" library in 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.

Unable to Load Built in Dataset

I'm trying to load the catsM dataset, but continue to get this error. I've tried the basics, restarting Rstudio, re-installing the package, etc., but continue to get this error.
install.packages("boot")
Installing package into ‘C:/Users/becky/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/boot_1.3-25.zip'
Content type 'application/zip' length 643617 bytes (628 KB)
downloaded 628 KB
package ‘boot’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\becky\AppData\Local\Temp\RtmpgHPMII\downloaded_packages
> library(boot)
> datasets:catsM
Error: object 'datasets' not found

Fail to install the "tidyverse" package

I am creating a plot using the ggplot() function in R Studio. For doing the job, I need to install the "tidyverse" package, but find installation failure. I will appreciate if you could solve the problem. The error messages are displayed in the console pane:
install.packages("tidyverse")
Installing package into ‘C:/Users/cheol/OneDrive/문서/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘purrr’
trying URL 'https://cran.cnr.berkeley.edu/bin/windows/contrib/3.6/purrr_0.3.3.zip'
Content type 'application/zip' length 426130 bytes (416 KB)
downloaded 416 KB
trying URL 'https://cran.cnr.berkeley.edu/bin/windows/contrib/3.6/tidyverse_1.3.0.zip'
Content type 'application/zip' length 440226 bytes (429 KB)
downloaded 429 KB
package ‘purrr’ successfully unpacked and MD5 sums checked
Error in install.packages : ERROR: failed to lock directory ‘C:\Users\cheol\OneDrive\문서\R\win-library\3.6’ for modifying
Try removing ‘C:\Users\cheol\OneDrive\문서\R\win-library\3.6/00LOCK’

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

Resources