Draws an arrow, or another kind of line, from one card to another: who handed what to whom.
Arguments
- map
A
stage_map()widget.- links
A data frame with one row per link. See "Columns".
NULL, or a data frame with no rows (such asdata.frame()), adds no links.- ...
Must stay empty. It makes every argument after it a named argument.
- kinds
A data frame with one row per kind of link, named in the legend, or
NULL: every link is then a plain arrow. Added only withlinks: whenlinksadds none, so do the kinds.
Value
The widget, with the links added. A widget that has links already is an error of class
stagemap_error_layer. A from or to that is not the id of a card, a kind that is not in kinds (or a
kind with no kinds given), a variants id that add_variants() has not given, a step that
add_steps() has not given, and an id given twice in kinds, are errors of class stagemap_error_data that
name the ids. A step or variants id is checked when the table it names arrives, in either order.
Columns
Required columns are marked with an asterisk.
links:from*,to*(card ids),kind(akindsid),label,step(the id of the step the link plays at, seeadd_steps()),variants(variant ids separated by commas, seeadd_variants()).kinds:id*,label*,line("solid","dashed","dotted"or"dashdot"),end("arrow","ring"or"none"),tone,quiet(TRUEdraws the links of that kind faint until the reader hovers over, focuses or picks them, or a step plays them; in print and in forced colours they are full strength; left out, it isFALSE). Use it for a kind that would otherwise crowd the picture.
A column the engine has no field for stays in the data the widget keeps in R and is not sent to the engine.
See also
Other stage map:
add_steps(),
add_variants(),
add_zones(),
stage_map(),
stage_map_code(),
stage_map_tables()
Examples
map <- stage_map(
cards = data.frame(
id = c("a", "b"),
label = c("Draft", "Review"),
stage = c("w", "c"),
lane = "docs"
),
stages = data.frame(id = c("w", "c"), label = c("Write", "Check")),
lanes = data.frame(id = "docs", label = "Docs")
) |>
add_links(
data.frame(from = "a", to = "b", kind = "hand"),
kinds = data.frame(id = "hand", label = "Handed over", line = "dashed")
)
class(map)
#> [1] "stage_map" "stagemap_widget" "htmlwidget"
if (FALSE) { # interactive()
map
}