steps_internal: Transform a graph of commits into a graph of steps.

Description Usage Arguments Details Value

Description

A step is an introduction of a new object or a new plot to the session. Graph of steps is easier to read for humans than a graph of commits becase only the relevant (new) information is shown in each node of the graph. Thus, translating from commits to steps is the first step to visualize the history stored in commits.

commit_to_steps generates a list with two elements:

introduced_in generates the filter for commit_to_steps's objects parameter. It does it by comparing the contents of the commit id against the contents of its parent.

read_objects reads every object/plot and fills in the contents or description. It is particularly useful when initial steps graph has been read without objects' contents, e.g. in query_by.

find_root_id searches for the single commit in the graph without a parent.

format prepares the expression for display in a HTML page.

description format the expression for display in a HTML page.

plot_to_dependencies processes the steps list and either:

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15

Arguments

graph

Object returned by graph().

commit

A commit() object.

objects

Filter for objects present in the commit.

id

Identifier of a commit in graph.

s

steps object.

store

An object store object, e.g. storage::filesystem.

g

A graph object.

code

R expression.

object

Object to be described.

steps

A list of steps.

embed

Whether to embed plots as base64-encoded strings.

Details

graph_to_steps is the main function that orchestrates the transformation.

The value returned by commit_to_steps is a list that contains two named elements: steps and links, whose values are again lists. The steps list holds description of objects present in the commit that also matched the filter defined in the argument objects. The links list defines graph edges among steps; edges are arbitrary as all objects are actually created in the same commit.

Each element in the steps list is itself a list that represents either an R object or a plot. Both alternatives share the following keys:

If type is equal to 'object', the followin keys are also present:

Alternatively, if type is equal to 'plot', the followin key is also present:

Value

Object of S3 class steps.

commit_to_steps returns a list of steps and links.

introduced_in returns a character vector.


lbartnik/experiment documentation built on May 20, 2019, 8:27 p.m.