dependencies {packdep} | R Documentation |
Count dependencies and reverse dependencies.
dependencies(x, order.by = c("none", "dependencies", "reverse"))
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), dependencies
(rows are sorted in order of decreasing number of dependencies) or reverse
(rows are sorted in order of decreasing number of reverse dependencies). |
This function uses available.packages
to get the
Depends, Imports and Suggests for all packages in a CRAN
or BioConductor mirror.
If repository
is set to bioc
, the contriburl
parameter is ignored and the URL of BioConductor is set via the
biocinstallRepos
function.
A data frame with the following columns:
package |
the name of the package. |
dependencies |
number dependencies of the package. |
reverse |
number of reverse dependencies (i.e. the number of packages that have the package in question as a dependency) of the package. |
The class of the data frame is changed to c("packdep.dependencies",
"data.frame")
to override the dispatch of the plotting methods
(currently plot
and hist
).
Radhakrishnan Nagarajan and Marco Scutari
map.depends
and plot dependencies
.
## Not run: d = map.depends() dependencies(d) # write a table containing the packages on CRAN, # ordered by decreasing betweenness, to a specified file. res = dependencies(d, order.by = "reverse") write.table(res, file = "reverse.dependencies.txt", row.names = FALSE) ## End(Not run)