The summary method for a cranly_dependence_tree
object returns
the number of generations the R package(s) in the object inherit
from (n_generations
), the immediate parents of the R package(s)
(parents
), and a dependence index dependence_index
defined as
$$ -\frac{\sum_{i \in C_p; i \ne p} \frac{1}{N_i} g_i}{\sum_{i
\in C_p; i \ne p} \frac{1}{N_i}} $$
where \(C_p\) is the dependence tree for the package(s) \(p\),
\(N_i\) is the total number of packages that depend, link or
import package \(i\), and \(g_i\) is the generation that
package \(i\) appears in the dependence tree of package(s)
\(p\). The generation takes values on the non-positive integers,
with the package(s) \(p\) being placed at generation 0
, the
packages that \(p\) links to, depends or imports at generation
-1
and so on.
A dependence index of zero means that the \(p\) only has
immediate parents. The dependence index weights the dependencies
based on how popular these are, in the sense that the index is
not penalized if the package depends on popular packages. The
greatest the dependence index is the more baggage the package
carries, and the maintainers may want to remove any dependencies
that are not necessary.