R/pkgDependencyMetrics.R
pkgCombDependencyGain.Rd
Calculate dependency gain achieved by excluding combinations of packages
pkgCombDependencyGain(pkg, depdf, maxNbr = 3L)
character, the name of the package for which we want to estimate the dependency gain
a tidy data frame with package dependency information
obtained through the function buildPkgDependencyDataFrame
numeric, the maximal number of direct dependencies to leave out simultaneously
A data frame with three columns: ExclPackages (the excluded direct dependencies), NbrExcl (the number of excluded direct dependencies), DepGain (the dependency gain from excluding these direct dependencies)
depdf <- buildPkgDependencyDataFrame(
dependencies=c("Depends", "Imports"),
repo=c("BioCsoft", "CRAN")
)
#> 'getOption("repos")' replaces Bioconductor standard repositories, see
#> 'help("repositories", package = "BiocManager")' for details.
#> Replacement repositories:
#> CRAN: https://cloud.r-project.org
pcd <- pkgCombDependencyGain('GEOquery', depdf, maxNbr = 3L)
head(pcd[order(pcd$DepGain, decreasing = TRUE), ])
#> Packages NbrExcl DepGain
#> 156 dplyr, readr, tidyr 3 27
#> 110 R.utils, readr, tidyr 3 16
#> 82 Biobase, readr, tidyr 3 14
#> 59 Biobase, R.utils, readr 3 13
#> 131 limma, readr, tidyr 3 13
#> 146 data.table, readr, tidyr 3 13