In the case of two signatures the result is an integer definining the number of indices by which the second signature is shifted compared to the first signature in the alignment. Note that this lag can be negative. In the case of multiple signatures the result is a vector of non-negative integers of the same length as signatures. Each element gives the number of indices by which the corresponding signature is shifted compared to the *first* signature. By definition, one of the numbers has to be 0 indicating the *first* signature. XXX Need to indicate that "first" isn't the col index

extract_feature_lag(aligned)

Arguments

aligned

data frame with variable x (for location) and two or more measurements (the bullets entry in the list returned from sig_align)

Value

(vector) of lags

See also

Examples

# NOT RUN {
library(bulletxtrctr)
library(x3ptools)

example_data <- bullet_pipeline(
  location = list(
    Bullet1 = c(hamby252demo$bullet1[2]),
    Bullet2 = c(hamby252demo$bullet2[4])
  ),
  x3p_clean = function(x) x %>%
      x3p_scale_unit(scale_by=10^6) %>%
      rotate_x3p(angle = -90) %>%
      y_flip_x3p()
)

alignment <- sig_align(example_data$sigs[[1]]$sig,
                       example_data$sigs[[2]]$sig)

extract_feature_lag(alignment$lands)
# }