• Stars
    star
    368
  • Rank 106,110 (Top 3 %)
  • Language
    R
  • License
    Other
  • Created about 4 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

View and Browse Code Using Flow Diagrams

R-CMD-check

flow

{flow} provides tools to visualize as flow diagrams the logic of functions, expressions or scripts and ease debugging.

Use cases are :

  • Deciphering other people’s code
  • Getting more comfortable with our own code by easing a visual understanding of its structure
  • Documentation
  • Debugging
  • Inspect unit test results
  • Providing a higher level view of an algorithm to collaborators
  • Education

Installation

Install from CRAN with:

install.packages("flow")

Or install development version from github:

remotes::install_github("moodymudskipper/flow")

Example

library(flow)

Using default nomnoml engine

flow_view(rle)

nomnoml

Using plantuml engine (make sure the {plantuml} package is installed).

flow_view(rle, engine = "plantuml")

plantuml

Additional functions

  • flow_run() to display not only the diagram, but the logical path taken by a specific call
  • flow_compare_runs() display the logical path of 2 calls to see where they diverge
  • flow_debug()/flow_undebug() to use basically use flow_run() on a function wherever it’s called
  • flow_view_vars() to display the dependencies between variables in a function
  • flow_view_deps() to display recursively all the functions that your function calls
  • flow_view_uses() to display recursively all the functions that call your function
  • flow_view_shiny() to display the modular structure of your shiny app
  • flow_view_source_calls() to display dependency tree of scripts sourcing each other
  • flow_doc() to build a package’s documentation using flow diagrams
  • flow_test() to show what happens in your unit tests
  • flow_embed() to embed diagrams in your documentation.

See more in vignettes.

Notes

Make sure to check the vignettes for a detailed breakdown of all features.

{flow} is built on top of Javier Luraschi’s {nomnoml} package, and Rainer M Krug ’s {plantuml} package, the latter only available from github at the moment.

More Repositories

1

unglue

Extract matched substrings using a pattern, similar to what package glue does in reverse
R
149
star
2

typed

Support Types for Variables, Arguments, and Return Values
R
137
star
3

boomer

Debugging Tools to Inspect the Intermediate Steps of a Call
R
132
star
4

powerjoin

Extensions of 'dplyr' and 'fuzzyjoin' Join Functions
R
92
star
5

fastpipe

A fast pipe implementation
R
83
star
6

nakedpipe

Pipe Into a Sequence of Calls Without Repeating the Pipe Symbol.
R
68
star
7

burglr

Copy Functions from Other Packages Without Adding Them As Dependencies
R
53
star
8

refactor

Tools for Refactoring Code
R
47
star
9

safejoin

Wrappers around dplyr functions to join safely using various checks
R
42
star
10

inops

Infix Operators for Detection, Subsetting and Replacement
R
40
star
11

reactibble

Use Dynamic Columns in Data Frames
R
39
star
12

opt

Set Options Conveniently
R
30
star
13

myverse

Easily Load a Set of Packages
R
25
star
14

boom

Print the Output of Intermediate Steps of a Call
R
23
star
15

doubt

Enable operators containing the '?' symbol
R
18
star
16

pipediff

Show Diffs Between Piped Steps
R
18
star
17

dotdot

Enhanced assignments. Use `..` on the right hand side as a shorthand for the left hand side.
R
17
star
18

elephant

make variables remember their history
R
15
star
19

ggframe

data frames that print as ggplots
R
15
star
20

tibbleprint

Print Data Frames Like Tibbles
R
14
star
21

datasearch

Find Datasets Observing Specific Conditions
R
13
star
22

tag

Build function operator factories supporting the tag$function(args) notation
R
13
star
23

once

A Collection of Single Use Function Operators
R
11
star
24

devtag

Restrict Help Files to Development
R
10
star
25

tricks

An Addin to Easily Program and Trigger Actions
R
9
star
26

tags

A collection of tags built using the package tag
R
8
star
27

ggfail

A Quick And Dirty Package to Make Wrong ggplot Calls Fail
R
8
star
28

liblog

Log Calls to loadNamespace
R
7
star
29

cutr

Enhanced cut And Useful Related Functions
R
7
star
30

woof

wadlo's companion package
R
7
star
31

ggdollar

Use nested lists of functions to set ggplot theme attributes intuitively
R
7
star
32

shootnloot

Easily share objects between remote sessions
R
7
star
33

pkg

Package Objects
R
6
star
34

midi

What the Package Does (Title Case)
R
6
star
35

mmpipe

Not maintained, use *pipes* instead : https://github.com/moodymudskipper/pipes which has a cleaner implementation (and a few differences)
R
6
star
36

goto

What the Package Does (One Line, Title Case)
R
5
star
37

shinycheck

Check shiny Code
R
5
star
38

loop

Alternatives to apply Functions
R
5
star
39

ghstudio

Experimental tools to use git/github with RStudio
R
4
star
40

withDT

Use data.table Syntax For One Call
R
3
star
41

dot3

Tools to Manipulate the Ellipsis Object
R
3
star
42

devtag.example

An example using 'devtag'
R
3
star
43

tidygm

Music as Tidy Data Frames
R
3
star
44

adventofcode2021

My Solutions for Advent Of Code 2021
R
2
star
45

blame

Semantic Version Control for R
R
2
star
46

replace

Replace Variable Names in R Scripts
R
2
star
47

github.traffic

What the Package Does (One Line, Title Case)
R
2
star
48

tabs

Extends rstudioapi
R
1
star
49

docalltest

Some alternative to do.call and a comparison
R
1
star
50

check

Readable Assertions
R
1
star
51

debugonce

Rstudio Addin to debugonce without typing
R
1
star
52

adventofcode2020

My Solutions for Advent Of Code 2020
R
1
star
53

tidyversediagrams

What the Package Does (One Line, Title Case)
R
1
star
54

pbfor

RETIRED, use {once} instead! https://github.com/moodymudskipper/once
R
1
star
55

selfbm

Benchmark a Function against Itself
R
1
star
56

private

private closures for closures
R
1
star
57

poof.tricks

What the Package Does (One Line, Title Case)
R
1
star
58

realquick

One line object summaries
1
star
59

flexaddins

What the Package Does (One Line, Title Case)
1
star
60

frankenply

Avoid Using Functionals by Prefixing your Arguments Directly in the Function Call
R
1
star
61

editor

Edit scripts programatically
R
1
star
62

pivot

Pivot Inside 'summarize' Calls
R
1
star