Giter VIP home page Giter VIP logo

deplearning's Introduction

deplearning

Utilise the synergy of algorithms and heuristics to unlock knowledge of R script/package dependencies.

Your first forays into understanding someone else's R analysis often involve flailing around trying to obtain all the required dependencies. This package will manage that for you by identifying your missing and out of date dependencies and offering a choice to automatically install & update.

Usage

Identify and Analyse Dependencies

depl_check(source_path) will examine the code found at or below source_path and produce a dependency report:

> depl_check()
[deplearning] Starting dependency check.
[deplearning] Searching path . 
[deplearning] Scanning 7 R source files... done.
[deplearning] Found 29 dependencies.
[deplearning] Fetching remote data... CRAN... GitHub... done.
[deplearning] ✔ 14 Installed and up to date.

 purrr, memoise, jsonlite, rstudioapi, tibble, clisymbols, knitr, tidyr, packagemetrics, xml2, devtools, testthat 

[deplearning] ✖ 2 Installed but behind CRAN release.

 package installed_ver CRAN_ver
  visdat    0.0.5.9000    0.1.0
   dplyr         0.7.1    0.7.2

[deplearning] ✖ 8 Missing CRAN packages.

  datapasta, A3, abc, switchr, dejaVu, Rborist, kpmt, fasjem 

[deplearning] ✖ 4 Missing GitHub packages.

  njtierney/naniar, maelle/rtimicropem, benmarwick/rrtools, MilesMcBain/packup 

[deplearning] ✖ 1 Missing packages from untracked repositories.

  notARealPackage 

[deplearning] ✔ Minimum R version to update & install is 3.3.1, you have 3.4.0.
[deplearning] ℹ  Update & install will include 18 new recursive dependencies.

  maps, gistr, assertive.base, assertive.files, assertive.numbers, assertive.properties, assertive.reflection, assertive.strings, assertive.types, pbapply, abc.data, quantreg, locfit, SparseM, MatrixModels, RJSONIO, RcppArmadillo, matrixStats 

[deplearning] Would you like to update & install old and missing dependencies?

1: Yes
2: No

Selection: 2
[deplearning] Dependency check finished without install & update.

There is also an RStudio addin hook to search the dependencies in the currently active window.

Dependencies are identified using by pattern matching against common methods: library(...), require(...), p_load(..., ..., ), ...::func()

Future Work

The plan is to extend this idea to:

  • Estimation of time until code can run based on analysis of recursive dependencies.

With Thanks To

deplearning's People

Contributors

federicomarini avatar kleinschmidt avatar milesmcbain avatar

Watchers

 avatar  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.