Learn R Programming

dynplot (version 1.1.2)

linearise_cells: Prepare a trajectory for linearised visualisation.

Description

This is an internal function and should probably not be used manually.

Usage

linearise_cells(
  trajectory,
  margin = 0.05,
  no_margin_between_linear = TRUE,
  one_edge = FALSE,
  equal_cell_width = FALSE
)

Arguments

trajectory

A dynwrap trajectory.

margin

A margin between trajectory segments.

no_margin_between_linear

Whether to add a margin only when a branch occurs.

one_edge

Whether or not to assign each cell to one cell only. This can occur when a cell is on a branching point, or in between multiple edges.

equal_cell_width

Whether or not to space segments according to cell count.

Value

A named list with values:

  • milestone_network: A linearised version of trajectory$milestone_network with extra columns: add_margin, n_margins, cumstart, cumend, edge_id.

  • progressions: A linearised version of trajectory$progressions with extra columns: percentage2, length, directed, add_margin, n_margins, cumstart, cumend, edge_id, cumpercentage.

  • margin: The used margin (numeric).

Examples

Run this code
# NOT RUN {
linearise_cells(example_bifurcating)

# }

Run the code above in your browser using DataLab