extract_all_cor: Extract All Correlations from an Object

View source: R/10-extract_data.R

extract_all_corR Documentation

Extract All Correlations from an Object

Description

Retrieves all correlation coefficients from a given object with predefined structure, associating them with their respective shift times.

Usage

extract_all_cor(object)

Arguments

object

An object that includes all_cor and shift_time attributes.

Details

The function accesses the all_cor component from the input object, which is expected to contain a series of correlation coefficients. It then retrieves the shift_time component from the same object and uses it to name the elements in the all_cor vector, effectively binding each correlation coefficient with its respective shift time. The resulting named vector is then returned.

Value

A named vector where each name is the corresponding shift time and each value is the correlation coefficient associated with that shift time.

Note

The object is assumed to have an accessible all_cor and shift_time attributes. This function is useful for subsequent analysis where the relationship between correlation coefficients and their corresponding shift times is needed.

Author(s)

Xiaotao Shen shenxt1990@outlook.com

Examples

data("object", package = "laggedcor")
extract_all_cor(object = object)

jaspershen/laggedcor documentation built on Nov. 9, 2023, 3:44 p.m.