Bins barcode-spots according to their angle towards the position specified with argument center.

bin_by_angle(
  coords_df,
  center,
  n_bins_angle = 1,
  angle_span = c(0, 360),
  min_bins_circle = NULL,
  rename = FALSE,
  remove = FALSE,
  drop = TRUE,
  var_to_bin = "barcodes",
  verbose = verbose
)

Arguments

coords_df

The coordinates data.frame whose barcode-spots are supposed to be binned.

center

Numeric vector of length two that is named. Value named x provides position on the x-axis. Value named y provides position on the y-axis.

min_bins_circle

Numeric value or NULL. Indiates the minimum number of circle bins the angle bin groups must have in order not to be renamed or removed. Ignored if NULL.

rename

Logical value. If TRUE, barcode-spots that fall into angle bins that feature less circle bins than input for argument min_bins_circle are renamed to 'Outside'. Ignored if min_bins_circle is NULL. Set remove to FALSE in order not to remove the renamed barcode-spots.

remove

Logical value. If TRUE, barcode-spots that fall into angle bins that do feature less circle bins than input for argument min_bins_circle are removed. Ignored if min_bins_circle is NULL.

drop

Logical value. If TRUE, unused levels of the bins_circle variables are dropped.