cranly (version 0.5.4)

build_network.cranly_db: 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 cranly_db
build_network(object, trace = FALSE,
  perspective = "package", ...)

Arguments

object

a cranly_db object. If missing (default) a call to clean_CRAN_db is issued.

trace

logical. Print progress information? Default is FALSE.

perspective

character. Should a "package" (default) or an "author" network be built?

...

Currently not used.

Value

A list of 2 data.frame objects with the edges and nodes of the network.

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.

See Also

clean_CRAN_db subset.cranly_network plot.cranly_network extractor-functions

Examples

Run this code
# NOT RUN {
cran_db <- clean_CRAN_db()
## 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)

## 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab