extract_all_cor_p: Extract All Correlation P-Values from an Object

View source: R/10-extract_data.R

extract_all_cor_pR Documentation

Extract All Correlation P-Values from an Object

Description

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

Usage

extract_all_cor_p(object)

Arguments

object

An object that includes all_cor_p and shift_time attributes.

Details

The function accesses the all_cor_p component from the input object, which is expected to contain a series of p-values for correlation tests. It then retrieves the shift_time component from the same object and uses it to name the elements in the all_cor_p vector, effectively binding each p-value with its corresponding 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 p-value for the correlation coefficient associated with that shift time.

Note

The object is presumed to have an accessible all_cor_p and shift_time attributes. This function is crucial for analyses where the significance of the correlation coefficients needs to be assessed in relation to their shift times.

Examples

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

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