sequence_cor: segment_cor

View source: R/sequence_cor.R

sequence_corR Documentation

segment_cor

Description

Finds correlation between all segments length n of a vector

Usage

sequence_cor(vec, n)

Arguments

vec

numeric vector to test for possible offset duplicate sequences

n

length of duplicate sequence to search for

Details

Embeds the vector into low-dimensional Euclidean space and then finds correlation between all columns. Pairs of columns with a correlation of 1 are either duplicates or have an offset.

Examples

set.seed(42) 
x <- rnorm(10)
x <- c(x, x[1:4] + 2.03)
sequence_cor(vec = x, n = 4)

Sorbus-torminalis/twopointzerothree documentation built on Aug. 18, 2022, 2:30 a.m.