I have seen similar questions for other packages and I have tried solutions offered in other posts, such as removing the package and installing it again, clearing global environment etc, but I still get the same error.
> library(ecospat)
Loading required package: ade4
Loading required package: ape
Loading required package: sp
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘slam’
I have tried updating all packages in RStudio, to no avail. I am currently trying to run a Boosted Regression Tree for data I have. If I proceed with the above error, I end up getting:
Error: could not find function "ecospat.boyce"
Any help would be highly appreciated.
I was having the same error message but in my case, it was the package called latticeExtra the one missing on my computer. I tried installing that package but was not available from CRAN. Then, I looked for the tar.gz file and tried installing the package, an error message popped up saying I needed a most recent version of R. Finally, I updated my R version (from 3.5.3 to 3.6.3) and tried using the ecospat package, it worked!
Related
I cannot manage to get the car package to download on RStudio Workbench version R 4.1.1. I am attempting to use the stat_cor function and get the error that it could not find function stat_cor, and from looking things up online, I need to download the ggpubr package and when I download it, I get the error:
Error: package or namespace load failed for ‘ggpubr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘car’
So my next step is to download car but I get another error from there essentially saying "Configuration failed for package 'nloptr'" and also "dependency 'nloptr' is not available for package 'lme4'" and lastly "dependency 'lme4' is not available for package 'car'". I tried installing nloptr and get the same error.
I am new with this, but if I want to use the stat_cor function I need ggpubr, and for ggpubr I need car to work right? Any help would be great.
install.packages("ggpubr")
install.packages("car")
library('ggplot2')
library('ggpubr')
library('car')
I'm unable to load the car package in R. I tried reinstalling using
install.packages("car",dependencies=TRUE)
both from R and RStudio. I tried installing quantreg as advised in another post and then installing it again. Installation appears to be successful, but simply can't load the program.
Here's the complete error:
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘pbkrtest’
In addition: Warning message: package ‘car’ was built under R version 3.2.3
Error: package or namespace load failed for ‘car’
This was just bumped to the homepage by Community. I can't take credit for the answer, but to give it a real non-comment answer:
You should upgrade R first. Then run update.packages(checkBuilt = TRUE). Finally, try again install.packages("car", dependencies=TRUE). If it doesn't work, try to install package pbkrtest first. - user3710546
Given that the current version of R at the time the question was posted was 3.2.3, I think that was a good answer.
I got the same error. (I am using R 3.2.2) Please perform the following steps in sequence (after that try to activate installed caret package):
install.packages("lme4", repos="http://cran.rstudio.com/",type = "binary", dependencies=TRUE)
install.packages("nlme", repos="http://cran.rstudio.com/",type = "binary", dependencies=TRUE)
packageurl <- "https://cran.r-project.org/src/contrib/Archive/pbkrtest/pbkrtest_0.4-4.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
No need to upgrade R. I am still using R 3.2.2. I performed these steps and it worked for me.
I've had the following error for the package Hmisc. I read another thread which asked more about the error message however it said not to post this as a comment. I've installed the package and received the following error when calling in the library:
> library(Hmisc)
Error: package or namespace load failed for ‘Hmisc’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘checkmate’
In addition: Warning message:
package ‘Hmisc’ was built under R version 3.4.4
I've tried deleting the install and then installing checkmate separately and manually installing this from a browser rather than through R directly. However the same error message is returning. Does anyone know how to overcome this? Or similar packages to Hmisc. I need to package for a wtd.quantile function.
install.packages('lattice')
library('lattice')
install.packages('survival')
library('survival')
install.packages('Formula')
library('Formula')
install.packages('ggplot2')
library('ggplot2')
install.packages('checkmate')
library('checkmate')
install.packages('htmlwidgets')
library('htmlwidgets')
install.packages('stringi')
library('stringi')
install.packages('Hmisc')
library('Hmisc')
I am trying to load the choroplethr package in R and keep getting an error message that I can't troubleshoot or understand. If someone could please provide me with a workaround to fix this that would be appreciated.
install.packages("choroplethr")
install.packages("choroplethrMaps")
library(choroplethr)
library(choroplethrMaps)
Loading required package: acs
Loading required package: stringr
Loading required package: XML
Attaching package: acs
The following object is masked from package:base:
apply
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘htmlTable’
In addition: Warning messages:
1: package ‘choroplethr’ was built under R version 3.2.5
2: package ‘stringr’ was built under R version 3.2.5
3: package ‘XML’ was built under R version 3.2.5
Error: package or namespace load failed for ‘choroplethr’
Thank you,
Kelly
I am the package author and unfortunately I often have users report errors like this.
Technically, when you install an R package all of the packages needed to run that package are supposed to automatically get installed. In practice, however, that does not always happen. The key part of the first error message you report is this:
Error ... there is no package called ‘htmlTable’
In response to that error message I would simply manually install the htmlTable package and then reinstall choroplethr:
install.packages("htmlTable")
install.packages("choroplethr")
Reading the comments from your initial question it seems like you were able to get past this error message but then ran into another one. Again, the key part of that error message seems to be the following:
Error ... there is no package called ‘rlang’
I would address this error in the same way. Ie type:
install.packages("rlang")
install.packages("choroplethr")
Again, I have no idea why errors like this seem to sporadically occur when people try to install choroplethr (and presumably other packages as well). However, the fix that always seems to work is manually installing the package which R complains it cannot find.
I'm unable to get the lmerTest R package to work (it's used to provide statistical tests for objects created with the lme4 package)
When I load it, it gives the following error
Loading required package: Matrix
Loading required package: lme4
Error: package or namespace load failed for ‘lmerTest’
in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
I've tried removing and re-installing both lmerTest and lme4, in both orders. I'm using the latest R version, both packages are installed in the correct library directory, and there are no permission issues. General solutions to this error when it comes up for other packages have not worked.