pkg <- read.dcf("../DESCRIPTION", fields = "Package")[1] library(pkg, character.only = TRUE)
library(`r pkg`)
package_metadata
pulls metadata from the DESCRIPTION files from a package
(or list of packages) and organizes them into a convenient table.
Metadata for the echoverse suite of
R packages will be retrieved by default.
While echoverse itself is not the name of an R package, package_metadata
will automatically recognise this special command and retrieve
all packages that are part of this suite.
meta_echoverse <- echodeps::package_metadata(pkgs = "echoverse") knitr::kable(meta_echoverse)
You can use the same function to find
meta <- echodeps::package_metadata(pkgs = c("dplyr","data.table","igraph")) knitr::kable(meta)
dep_graph
builds upon the above functions and create a dependency graph for
all the dependencies of a given R package
(or a selected subset of its dependencies).
Metadata for each package is automatically extracted and shown as tooltips that appear when you hover over the respective node.
All of the plots, graphs, metadata, and saved file paths generated by
dep_graph
are returned to the user as a named list in case they would like
to explore them further.
res_echoverse <- echodeps:: dep_graph(pkg = "echolocatoR", ## Setting show_plot for vignette purposes show_plot = list(r=TRUE, browser=FALSE))
res <- echodeps::dep_graph(pkg = "dplyr", shape = "hexagon", layout = function(graph, pkg){ visNetwork::visIgraphLayout( graph = graph, layout = "layout_nicely" ) } )
utils::sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.