centrality {packdep} | R Documentation |
Estimate packages' betweenness and closeness indexes.
centrality(x, order.by = c("none", "betweenness", "closeness"))
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). |
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
).
Radhakrishnan Nagarajan and Marco Scutari
Wasserman S, Faust K (2007) Social Network Analysis. Cambridge University Press.
map.depends
and plot centrality
.
## 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)