caret-machine-learning icon indicating copy to clipboard operation
caret-machine-learning copied to clipboard

DESCRIPTION file of package '' is missing or broken

Open tobigithub opened this issue 10 years ago • 1 comments

After using the deLuxe caret installer a number of problems occur, the library directories for MASS and plyr and nnet can be empty under windows (only containing a dll, but no R nor HTM and no META sub directory)


> data(BloodBrain); set.seed(123)
Warning message:
In data(BloodBrain) : data set ‘BloodBrain’ not found
> fit1 <- train(bbbDescr, logBBB, "knn"); fit1
Error: could not find function "train"
> library(caret)
Loading required package: lattice
Loading required package: ggplot2
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called ‘plyr’
Error: package ‘ggplot2’ could not be loaded
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] lattice_0.20-33

loaded via a namespace (and not attached):
[1] tools_3.2.2  gtable_0.1.2 grid_3.2.2   digest_0.6.8

and

library(caret)
sessionInfo()

loaded via a namespace (and not attached):
Error in x[["Version"]] : subscript out of bounds
In addition: Warning messages:
1: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'MASS' is missing or broken
2: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'plyr' is missing or broken
3: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'nnet' is missing or broken
4: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'nlme' is missing or broken
5: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'mgcv' is missing or broken

code used

# Installation of caret package with allmost 400 required caret dependencies 
# https://github.com/tobigithub/caret-machine-learning
# Tobias Kind (2015)

# installs most of the 340 caret dependencies + seven commonly used but not all of them
mostCommon <- c("caret", "AppliedPredictiveModeling", "ggplot2", "data.table", "plyr", "knitr", "shiny", "xts", "lattice")
install.packages(mostCommon, dependencies = c("Imports", "Depends", "Suggests"))          

# then load caret and check which additional libraries covering 200 models need to be installed
# warnings will still exist
require(caret); sessionInfo();
caretLibs <- unique(unlist(lapply(getModelInfo(), function(x) x$library)))
install.packages(caretLibs, dependencies = c("Imports", "Depends", "Suggests")) 

# now load caret packages from BioConductor
# this is a static solution (not good) check with below URL for more info
# https://github.com/topepo/caret/blob/master/release_process/update_pkgs.R
source("https://bioconductor.org/biocLite.R")
biocLite()
biocLite(c("arm", "gpls", "logicFS", "vbmp"))

# in case of final installation issues, check packages plyr, MASS and ggplot2
# the library directories may have to be removed manually with Administrator access
# and R has to be closed and restarted and the following two lines below have to be executed
# (additional issues may occour under WIN with doMPI and msmpi.dll)
## rP <- c("plyr","ggplot2","MASS")
## install.packages(rP, dependencies = c("Imports", "Depends", "Suggests")) 

### END

tobigithub avatar Nov 05 '15 05:11 tobigithub

Close R and restart R

update.packages()

if more messages occur, close R, remove directories using ADMIN access and repeat

 rP <- c("plyr","ggplot2","MASS")
 install.packages(rP, dependencies = c("Imports", "Depends", "Suggests")) 

this is typical R and repo CF.

tobigithub avatar Nov 05 '15 06:11 tobigithub