boxview::boxview()
displays the code of a function in nested boxes,
showing the ‘yes’ and ‘no’ clauses of if
calls side by side. It often
makes code easier to skim than the traditional way.
You can install the development version of boxview like so:
pak::pak("cynkra/boxview")
Here’s base::interaction()
shown with boxview and in the console.
There’s also a width
argument to adjust, and an optimization
argument that you might use to get a nicer output, at the cost of taking
more time.
The flow package and in
particular the function flow::flow_view()
for a somewhat comparable
way to represent functions.