prep_velocity: prep_velocity

prep_velocityR Documentation

prep_velocity

Description

prep_velocity

Usage

prep_velocity(
  tsne_dt,
  tall_var_a,
  tall_var_b,
  id_to_plot = NULL,
  max_plotted = 500,
  delta.min = 0,
  delta.max = Inf,
  angle.min = 0,
  angle.max = 360,
  drop_backgroud = FALSE
)

Arguments

tsne_dt

tidy data.table of tsne results. variables names must include: tx, ty, id, and tall_var

tall_var_a

an item in tsne_dt$tall_var. the origin for calculating angle/distance.

tall_var_b

an item in tsne_dt$tall_var. the destination for calculating angle/distance.

id_to_plot

character. ids in tsne_dt$id. Default of NULL causes all ids to be used.

max_plotted

the maximum number of ids to plot.

delta.min

numeric. ids below this delta marked as background.

delta.max

numeric. ids above this delta marked as background.

angle.min

numeric. ids with angle below this marked as background.

angle.max

numeric. ids with angle above this marked as background.

drop_backgroud

if TRUE, all background velocities are dropped. Default is FALSE.

Value

a tidy data.table of velocity measurements from tall_var_a to tall_var_b

Examples

data("tsne_dt")
vel_dt = prep_velocity(tsne_dt,
    unique(tsne_dt$tall_var)[2], unique(tsne_dt$tall_var)[3])
vel_dt

jrboyd/seqtsne documentation built on Nov. 5, 2022, 6:37 a.m.