Learn R Programming

dynplot (version 1.1.2)

project_waypoints_coloured: Project the waypoints

Description

Project the waypoints

Usage

project_waypoints_coloured(
  trajectory,
  cell_positions,
  edge_positions = NULL,
  waypoints = dynwrap::select_waypoints(trajectory),
  trajectory_projection_sd = sum(trajectory$milestone_network$length) * 0.05,
  color_trajectory = "none"
)

Arguments

trajectory

A dynwrap trajectory.

cell_positions

The positions of the cells in 2D. Must be a tibble with character column cell_id and numeric columns comp_1 and comp_2.

edge_positions

The positions of the edges.

waypoints

The waypoints to use for projecting. Can by generated using dynwrap::select_waypoints().

trajectory_projection_sd

The standard deviation of the gaussian kernel.

color_trajectory

How to color the trajectory, can be "nearest" for coloring to nearest cell, or "none".

Value

A named list containing items:

  • segments: A tibble containing columns comp_1 (numeric), comp_2 (numeric), waypoint_id (character), milestone_id (character), from (character), to (character) percentage (numeric), group (factor), and arrow (logical).