extract_global_cor: Extract Global Correlation Value

View source: R/10-extract_data.R

extract_global_corR Documentation

Extract Global Correlation Value

Description

Retrieves a specific correlation value indexed by which_global_idx from the all_cor attribute of the given object, with the associated shift time as its name.

Usage

extract_global_cor(object)

Arguments

object

An object that includes all_cor, shift_time, and which_global_idx attributes.

Details

This function is specifically designed to extract a correlation value that is designated as "global" within the context of the object's dataset. The which_global_idx is expected to be an attribute within the object that specifies the index of this global correlation value in the all_cor vector. The corresponding shift time is extracted from the shift_time attribute and assigned as the name to the returned value.

Value

A single named element from the all_cor attribute. The name is the shift time associated with this correlation value, indexed by which_global_idx.

Note

The function assumes that the object has attributes all_cor and shift_time with the same length, and which_global_idx that points to a valid index within them. The purpose of which_global_idx should be documented elsewhere, detailing why this particular index is significant.

Author(s)

Xiaotao Shen shenxt1990@outlook.com

Examples

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

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