heaviness_on_downstream | R Documentation |
Heaviness on all downstream packages
heaviness_on_downstream(package, add_values_attr = FALSE, via = NULL,
total = FALSE, internal = FALSE)
package |
A package name. |
add_values_attr |
Whether to include "values" attribute? Internally used. |
via |
Whether to only consider downstream packages via a intermediate package? |
total |
Whether to return the total heaviness? |
internal |
Whether to use internally calculated heaviness? |
It is calculated based on a specific CRAN/Bioconductor snapshot. The version is set via pkgndep_opt
$heaviness_db_version.
The value is the mean heaviness of the package on all its downstream packages. Denote n
as the number of all its downstream packages,
k_i
as the number of required packages for package i,
v_1
as the total number of required packages for all downstream packages, i.e. v_1 = sum_i^n {k_i}
. Denote p_i
as the number of required packages if moving package
to Suggests
,
and v_2
as the total number of required packages, i.e. v_1 = sum_i^n {p_i}
. The final heaviniss on downstream packages is (v_1 - v_2)/n
.
Note since the interaction from package
to its downstream packages may go through several intermediate packages, which means, the reduction of required packages
for a downstream package might be joint effects from all its upstream packages, thus, to properly calculate the heaviness of a package to its downstream packages, we first make
a copy of the package database and move package
to Suggests
for all packages which depends on package
. Then for all downstream packages of package
, dependency analysis
by pkgndep
is redone with the modified package database. Finally, the heaviness on downstream packages is collected and the mean heaviness is calculated.
## Not run:
heaviness_on_downstream("ComplexHeatmap")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.