build_network.cranly_db {cranly} | R Documentation |
Compute edges and nodes of package directives and collaboration networks
Description
Compute edges and nodes of package directives and collaboration networks
Usage
## S3 method for class 'cranly_db'
build_network(object, trace = FALSE, perspective = "package", ...)
Arguments
object |
a |
trace |
logical. Print progress information? Default is |
perspective |
character. Should a |
... |
Other arguments passed in |
Details
The convention for a cranly_network
object with
perspective = "package"
is that the direction of an edge is
from the package that is imported by, suggested by, enhances or is
a dependency of another package, to the latter package. The author
collaboration network is analyzed and visualized as undirected by
all methods in cranly
.
Value
A list of 2 data.frame
objects with the edges
and nodes
of the network.
See Also
clean_CRAN_db()
subset.cranly_network()
plot.cranly_network()
extractor-functions
Examples
cran_db <- clean_CRAN_db()
## Build package directives network
package_network <- build_network(object = cran_db, perspective = "package")
head(package_network$edges)
head(package_network$nodes)
attr(package_network, "timestamp")
class(package_network)
## Build author collaboration network
author_network <- build_network(object = cran_db, perspective = "author")
head(author_network$edges)
head(author_network$nodes)
attr(author_network, "timestamp")
class(author_network)