pkg <- read.dcf("../DESCRIPTION", fields = "Package")[1]
library(pkg, character.only = TRUE)
library(`r pkg`)

Gather package metadata

echoverse

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)

dplyr

You can use the same function to find

meta <- echodeps::package_metadata(pkgs = c("dplyr","data.table","igraph"))

knitr::kable(meta)

Create a dependency graph

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_graphare returned to the user as a named list in case they would like to explore them further.

echolocatoR

res_echoverse <- echodeps:: dep_graph(pkg = "echolocatoR",
                                     ## Setting show_plot for vignette purposes
                                     show_plot = list(r=TRUE,
                                                      browser=FALSE))

dplyr

res <- echodeps::dep_graph(pkg = "dplyr",
                           shape = "hexagon", 
                           layout = function(graph, pkg){
                               visNetwork::visIgraphLayout(
                                   graph = graph,
                                   layout = "layout_nicely"
                               )
                           }
                           )

Session Info

utils::sessionInfo()




RajLabMSSM/echodeps documentation built on Oct. 31, 2023, 7:20 a.m.