calc_delta: calc_delta

View source: R/functions_util.R

calc_deltaR Documentation

calc_delta

Description

calculates delta (distance/difference) between points in tall_var_a and tall_var_b according to strategy.

Usage

calc_delta(
  tsne_dt,
  tall_var_a,
  tall_var_b,
  x_points,
  y_points = x_points,
  strategy = "normal"
)

Arguments

tsne_dt

result of stsRunTsne()

tall_var_a

character that matches single item in tsne_dt$tall_var. The origin of deltas.

tall_var_b

character that matches single item in tsne_dt$tall_var The destination of deltas.

x_points

number of equally spaced bins in the x-dimension. Required.

y_points

number of equally spaced bins in the y-dimension. Default is x_points.

strategy

character. One of c("by_destination", "by_direction", "individual_recentered", "normal")

Value

data.table with directional and angle information added.

Examples

data(tsne_dt)
calc_delta(tsne_dt, unique(tsne_dt$tall_var)[1], unique(tsne_dt$tall_var)[2], x_points= 4)

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