extract_feature_lag: Extract lag from two (or more) aligned signatures

View source: R/features.R

extract_feature_lagR Documentation

Extract lag from two (or more) aligned signatures

Description

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

Usage

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

Other alignment-related-features: extract_feature_D(), extract_feature_ccf(), extract_feature_lag_mm(), extract_feature_length_mm(), extract_feature_length(), extract_feature_overlap(), extract_features_all()

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)

## End(Not run)

heike/bulletxtrctr documentation built on March 8, 2024, 7:41 p.m.