getCorrMtr: Obtain correlation matrix

getCorrMtrR Documentation

Obtain correlation matrix

Description

Extracts correlation results in form of correlation matrices.

Usage

getCorrMtr(object, ...)

## S4 method for signature 'Correlation'
getCorrMtr(
  object,
  method_corr = "pearson",
  across = NULL,
  across_subset = NULL,
  type = "complete",
  diagonal = TRUE,
  flatten = 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.

type

Character value. Denotes how the underlying correlation matrix is handled. Three options:

  • 'complete': The matrix stays as is.,

  • 'lower': The part below the diagonal is used. The upper part is set to NA.,

  • 'upper':The part above the diagonal is used. the lower part is set to NA.

diagonal

Logical value. Indicates if the diagonal values of the matrices are kept ( = TRUE) or set to NA (= FALSE). Ignored if type = 'complete'.

Details

If across is a character a list of correlation matrices is returned. Slots are named according to the groups of the denoted grouping variable. If across_subset is NULL all groups are considered. If across_subset is of length one and flatten is TRUE the output list is flattened and a single correlation matrix is returned.


kueckelj/confuns documentation built on July 4, 2024, 4:53 p.m.