Description Usage Arguments Value Examples
For a number of correlation meansurements produced by trim_cor
will return the shift with the highest correlation value.
1 |
cor_measurements |
vector of correlation values and shift |
value |
boolean, whether to return a numerical correlation value |
max_shift shift with the highest correlation. If value
is
TRUE
then it will also return the correlation value
1 2 3 4 5 6 7 8 9 10 11 | # create dummy dataset
l <- list()
for (i in 1:100) l[[i]] <- rnorm(100)
df <- as.data.frame(l)
names(df) <- paste("col", 1:100, sep = "_")
# order values (more obvious correlation shifts)
df <- apply(df, 2, sort)
out <- trim_cor(df[,1], df[,2], n = 5, p = 5)
max_shift(out)
max_shift(out, value = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.