convert_edgelist | R Documentation |
This generic function converts several data structures provided by rang into an edgelist of package dependencies.
convert_edgelist(x, ...)
## Default S3 method:
convert_edgelist(x, ...)
## S3 method for class 'ranglet'
convert_edgelist(x, ...)
## S3 method for class 'rang'
convert_edgelist(x, ...)
x, |
supported data structures are |
..., |
not used |
the resulting data frame can be converted to an igraph object for plotting and analysis via the function igraph::graph_from_data_frame()
a data frame of directed edges of dependencies
if (interactive()) {
graph <- resolve(pkgs = c("openNLP", "LDAvis", "topicmodels", "quanteda"),
snapshot_date = "2020-01-16")
# dependency edgelist of a single package
convert_edgelist(graph$ranglets[[1]])
# full dependency edgelist
convert_edgelist(graph)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.