my_ccf: Cross correlation function between two vectors

View source: R/alignment.R

my_ccfR Documentation

Cross correlation function between two vectors

Description

Cross correlation function between two vectors

Usage

my_ccf(x, y, min.overlap = 0.1 * max(length(x), length(y)))

Arguments

x

vector

y

vector

min.overlap

integer value: what is the minimal number of values between x and y that should be considered?

Value

list with ccf values and lags

Examples

library(dplyr)
x <- runif(20)
my_ccf(x, lead(x, 5))
my_ccf(x, lag(x, 5), min.overlap=3)
x <- runif(100)
my_ccf(x[45:50], x, min.overlap=6)

erichare/bulletr documentation built on May 3, 2024, 10:14 p.m.