View source: R/10-extract_data.R
extract_max_cor | R Documentation |
Retrieves the maximum correlation value from the all_cor
attribute of the given object
and provides the associated shift time as the name of the value.
extract_max_cor(object)
object |
An object that includes |
The function selects the maximum value from the all_cor
attribute, which is a vector of correlation
coefficients. It then matches this maximum value with its corresponding shift time from the
shift_time
attribute. This shift time becomes the name of the returned value, allowing for easy
identification of when the maximum correlation occurs.
A single named element. The name is the shift time associated with the maximum correlation
value in the all_cor
attribute of the object.
The object
is expected to have an all_cor
attribute that contains correlation values and
a shift_time
attribute that contains the corresponding shift times. This function simplifies
the process of identifying the point in time with the highest correlation coefficient.
data("object", package = "laggedcor")
extract_max_cor(object = object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.