centrality {packdep}R Documentation

Packages' betweenness and closeness

Description

Estimate packages' betweenness and closeness indexes.

Usage

  centrality(x, order.by = c("none", "betweenness", "closeness"))

Arguments

x an object of class igraph returned by map.depends.
order.by a character string. Possible values are none (rows in the returned data frame are not sorted), betweenness (rows are sorted in order of decreasing betweenness) or closeness (rows are sorted in order of decreasing closeness).

Value

A data frame with the following columns:

package the name of the package.
betweenness the betweenness centrality measure for the package.
closeness the closeness centrality measure for the package.


The class of the data frame is changed to c("packdep.centrality", "data.frame") to override the dispatch of the plotting methods (currently plot and hist).

Author(s)

Radhakrishnan Nagarajan and Marco Scutari

References

Wasserman S, Faust K (2007) Social Network Analysis. Cambridge University Press.

See Also

map.depends and plot centrality.

Examples

## Not run: 
d = map.depends()
centrality(d)

# write a table containing the packages on CRAN,
# ordered by decreasing betweenness, to a specified file.
res = centrality(d, order.by = "betweenness")
write.table(res, file = "centrality.txt", row.names = FALSE)
## End(Not run)

[Package packdep version 0.2 Index]