Heaviness on all downstream packages
heaviness_on_downstream(package, add_values_attr = FALSE)
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.
A package name.
Whether to include "values" attribute? Internally used.
if (FALSE) {
heaviness_on_downstream("ComplexHeatmap")
}
Run the code above in your browser using DataLab