Dependency graph

library(data.table)

A dependency graph for all GitHub repos that use the rworkflows GitHub Action.

Create

Here is the code for creating the plot.

Install required packages

if(!require("echodeps"))remotes::install_github("RajLabMSSM/echodeps",
                                                dependencies = TRUE)

Create graph

res <- echodeps::dep_graph(pkg = "rworkflows",
                           method_seed = "github",
                           exclude = c("neurogenomics_rworkflows",
                                       "neurogenomics_r_workflows"),
                           #node_size = "total_downloads", 
                           reverse = TRUE,
                           save_path = here::here("reports","rworkflows_depgraph.html")) 

Save data

## Save network plot as PNG
echodeps::visnet_save(res$save_path)

## Save all data and plots
saveRDS(res, here::here("reports","dep_graph_res.rds"))

Count stars/clones/views

knitr::kable(res$report)

Show

rworkflow depgraph

Hover over each node to show additional metadata.

Identify highly downloaded packages

Identify the CRAN/Bioc R packages with the most number of downloads. This guides which packages would be the most useful to focus on implementing rworkflows in.

pkgs <- echogithub::r_repos_downloads(which = c("CRAN","Bioc"))

#### Get top 10 per R repository ####
pkgs_top <- pkgs[, tail(.SD, 10), by="r_repo"] 
methods::show(pkgs_top)

Assess R repository usage

This demonstrates the need for using rworkflows, as there are 25,000 R packages that are exclusively distributes via GitHub (which may or may not have code/documentation checks).

r_repos_res <- echogithub::r_repos(save_path = here::here("reports","r_repos_upset.pdf"), width=12)

Session Info

utils::sessionInfo()




Try the rworkflows package in your browser

Any scripts or data that you put into this service are public.

rworkflows documentation built on Nov. 2, 2023, 5:21 p.m.