getRcorr: Obtain object of class 'rcorr'

getRcorrR Documentation

Obtain object of class rcorr

Description

Extracts correlation results in form of class rcorr.

Usage

getRcorr(object, ...)

## S4 method for signature 'Correlation'
getRcorr(
  object,
  method_corr = "pearson",
  across = NULL,
  across_subset = NULL,
  as_list = FALSE,
  flatten = TRUE
)

## S4 method for signature 'CorrelationMethod'
getRcorr(
  object,
  method_corr = "pearson",
  across = NULL,
  across_subset = NULL,
  as_list = FALSE,
  stop_if_null = TRUE
)

## S4 method for signature 'Analysis'
getRcorr(
  object,
  method_corr = "pearson",
  across = NULL,
  across_subset = NULL,
  as_list = FALSE,
  stop_if_null = TRUE
)

Arguments

object

Any object for whose class a method has been defined.

across

Character value. Specifies the discrete variable in the data.frame across which the variables of interest are to be analyzed or displayed.

as_list

Logical value. If TRUE, rcorr objects are returned as simple lists.

stop_if_null

Logical value. If TRUE and the function does not find the object to extract an informative error is raised. Else the empty value - usually NULL - is returned.

Details

If across is NULL one object of class rcorr is returned - the one for the complete data set. If across is a character the list of rcorr is extracted and subsetted by the groups of interest denoted in across_subset. If across_subset is NULL the complete list is returned. If across_subset is of length one and flatten is TRUE the output list is flattened and a single rcorr object is returned.


kueckelj/confuns documentation built on June 28, 2024, 9:19 a.m.