GithubHelp home page GithubHelp logo

mariusbarth / depgraph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from crsh/depgraph

0.0 0.0 0.0 658 KB

Provides an R function to plot the complete dependency graph of an R package and helps to cut down on dependencies.

License: Other

R 100.00%

depgraph's Introduction

depgraph: Plot the complete dependency graph of an R package

CRAN/METACRAN Project Status: Active – The project has reached a stable, usable state and is being actively developed. GitHub last commit (devel) GitHub bug issues

Provides a function to plot the complete dependency graph of an R package and helps to cut down on dependencies.

Installation

You can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("crsh/depgraph")

Example

Currently, depgraph ships only a single function that plots the dependency graph of an R package based on its DESCRIPTION file. Consider the following example.

library("depgraph")

plot_dependency_graph(
  pkg = multibridge_pkg
  , suggests = FALSE
  , option = "cividis"
)
Dependency graph of a historic development version of the R package `multibridge`.

Dependency graph of a historic development version of the R package multibridge.

Such plots can be used for at least two purposes:

  1. Including dependency graphs in an R package README shows users how many packages their work depends on (indirectly). This is useful as a very rough index of package reliability (less dependencies generally mean less potential for breaking upstream changes) and installation time.
  2. Dependency graphs are useful to identify potential to cut down on dependencies. Briefly, in these graphs you can look for “hot spots” in the network (big bright dots), which represent packages that have many upstream dependencies but are potentially easy to remove because they have few downstream dependencies (that is, only your package depends on them).

Some more details on how to use this graph to reduce package dependencies are given in the package vignette:

vignette("depgraph", package = "depgraph")

Package dependencies

Yeah, I know…:see_no_evil:

plot_dependency_graph(
  pkg = "."
  , suggests = FALSE
  , option = "cividis"
)
Dependency graph of `depgraph`.

Dependency graph of depgraph.

depgraph's People

Contributors

crsh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.