| Title: | Recursively Determine and Install Missing Dependencies |
|---|---|
| Description: | For a list of specified package, we automate recursively determining and installing the missing CRAN package dependencies ("Depends", "Imports", "LinkingTo"). The main mechanisms used are tools::package_dependencies() and utils::install.packages(). |
| Authors: | Barry Zeeberg [aut, cre] |
| Maintainer: | Barry Zeeberg <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.0 |
| Built: | 2026-10-07 17:16:17 UTC |
| Source: | https://github.com/cran/installationDriver |
determine missing dependencies and install them, packs do not need to be installed or loaded
installationDriver(dir, packs, reportPacks = FALSE, verbose = 4)installationDriver(dir, packs, reportPacks = FALSE, verbose = 4)
dir |
character string containing the name of the directory holding packs |
packs |
list of package names |
reportPacks |
Boolean if FALSE do not return packages in parameter packs even if missing |
verbose |
integer passed to vprint() |
the return value 'missing' is a Boolean vector whose components are the names of missing dependencies
a value of FALSE means that the missing dependency is no longer missing because it was successfully installed
returns a Boolean vector confirming installation of missing dependencies, also has side effect of installing some or all missing dependencies
## Not run: # you need to specify dir, packs that are on your own computer !! # purposely remove a required library to make install go through its paces !! remove.packages("hash") dir1<-"~/personal/hearts/hearts_card_game_bayesian_inference" dir2<-"packages/inference_packages/inference_packages/" dir<-sprintf("%s/%s",dir1,dir2) packs<-c("cardUtils","clickableImageMap","editDriver", "heartsCIM","iterationDriver","logos","playOneTrick", "playWholeHandDriverPassParams","probTab","relaxDriver") missing<-installationDriver(dir,packs,reportPacks=FALSE,verbose=c(-1,4)) ## End(Not run)## Not run: # you need to specify dir, packs that are on your own computer !! # purposely remove a required library to make install go through its paces !! remove.packages("hash") dir1<-"~/personal/hearts/hearts_card_game_bayesian_inference" dir2<-"packages/inference_packages/inference_packages/" dir<-sprintf("%s/%s",dir1,dir2) packs<-c("cardUtils","clickableImageMap","editDriver", "heartsCIM","iterationDriver","logos","playOneTrick", "playWholeHandDriverPassParams","probTab","relaxDriver") missing<-installationDriver(dir,packs,reportPacks=FALSE,verbose=c(-1,4)) ## End(Not run)
retrieve a list of the imported packages in a NAMESPACE FILE, packs do not need to be installed or loaded
retrieveNamespace2(dir, packs)retrieveNamespace2(dir, packs)
dir |
character string containing the name of the directory holding packs |
packs |
list of package names |
returns a list containing the imported package names
## Not run: # you need to specify dir, packs that are on your own computer !! dir1<-"~/personal/hearts/hearts_card_game_bayesian_inference" dir2<-"packages/inference_packages/inference_packages/" dir<-sprintf("%s/%s",dir1,dir2) packs<-c("cardUtils","clickableImageMap","editDriver", "heartsCIM","iterationDriver","logos","playOneTrick", "playWholeHandDriverPassParams","probTab","relaxDriver") rns<-retrieveNamespace2(dir,packs) ## End(Not run)## Not run: # you need to specify dir, packs that are on your own computer !! dir1<-"~/personal/hearts/hearts_card_game_bayesian_inference" dir2<-"packages/inference_packages/inference_packages/" dir<-sprintf("%s/%s",dir1,dir2) packs<-c("cardUtils","clickableImageMap","editDriver", "heartsCIM","iterationDriver","logos","playOneTrick", "playWholeHandDriverPassParams","probTab","relaxDriver") rns<-retrieveNamespace2(dir,packs) ## End(Not run)