Reputation: 137
I have tried multiple ways to install the caret
package in R.
The error message that I receive is as follows:
Error: package or namespace load failed for ‘caret’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘dimRed’
When I try to install dimRed
, I get the following message:
Installing package into ‘C:/Users/Thomas/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘Biobase’ is not available
There is a binary version available but the source version is later:
binary source needs_compilation
dimRed 0.1.0 0.2.1 FALSE
installing the source package ‘dimRed’
trying URL 'https://cran.rstudio.com/src/contrib/dimRed_0.2.1.tar.gz'
Content type 'application/x-gzip' length 363025 bytes (354 KB)
downloaded 354 KB
ERROR: dependency 'Biobase' is not available for package 'dimRed' * removing 'C:/Users/Thomas/Documents/R/win-library/3.4/dimRed' In R CMD INSTALL Warning in install.packages : running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\Users\Thomas\Documents\R\win-library\3.4" C:\Users\Thomas\AppData\Local\Temp\RtmpqKhsKn/downloaded_packages/dimRed_0.2.1.tar.gz' had status 1 Warning in install.packages : installation of package ‘dimRed’ had non-zero exit status
The downloaded source packages are in ‘C:\Users\Thomas\AppData\Local\Temp\RtmpqKhsKn\downloaded_packages’
Per previous posts, I have updated RStudio. I have attempted an install from install_url.
Any suggestions are welcome.
Upvotes: 3
Views: 7622
Reputation: 11
Warning ...
install.packages("BiocManager")
This only works if your R version is >= 3.5.0
for info I've the same problem under a Centos and a Windows. issue solved on the windows with 3.5.1 R version. Not yet solved on the centOS (3.4.2)
Upvotes: -1
Reputation: 41
I was able to figure this out. Simply typing install.packages won't work. In order to install Biobase, you have to run the following code in R console:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("Biobase", version = "3.8")
More info: https://bioconductor.org/packages/release/bioc/html/Biobase.html
Once this step is done, I installed caret again using
install.packages("caret",dependencies = T)
And then it worked.
Upvotes: 4