plotCorrelationSD: Plot correlation variance across groups

View source: R/correlation-analysis.R

plotCorrelationSDR Documentation

Plot correlation variance across groups

Description

Uses the style of correlation matrices to visualize the standard deviation of the correlation values across groups of a grouping variable - indicating which grouping is responsible for changes in correlation.

Usage

plotCorrelationSD(
  object,
  variable_set,
  method_corr = NULL,
  phase = NULL,
  across = NULL,
  relevel = NULL,
  variables_subset = NULL,
  signif_level = NULL,
  clrsp = NULL
)

Arguments

object

A valid cypro object.

variable_set

Character value. Denotes the variable set of interest. Use getVariableSetNames() to obtain all names of currently stored variable sets in your object.

method_corr

Character value. Denotes the correlation method of interest. Either 'pearson' or 'spearman'.

phase

Character or numeric. If character, the ordinal value referring to the phase of interest (e.g. 'first', 'second' etc.). referring to the phase of interest or 'all'. If numeric, the number referring to the phase.

If set to NULL takes the phase denoted as default with adjustDefault().

Ignored if the experiment design contains only one phase.

across

Character vector (!). Denotes all grouping variables of interest.

relevel

Logical value. If set to TRUE the input order of across_subset determines the order in which the groups of interest are displayed. Groups that are not included are dropped which affects the choice of color.

variables_subset

Character vector or NULL. Specifies the numeric variables you want to be included in the correlation plot.

If set to NULL all of them are chosen. You can prefix variables you do NOT want to influence the clustering with a '-'. (Saves writing if there are more variables you are interested in than variables you are not interested in.)

signif_level

Numeric value or NULL. If numeric, specifies the minimum significance level a correlation pair must feature in order to be displayed. Insignificant correlation values are crossed out. Argument shape_size denotes the size of the crosses.

Value

A ggplot.


theMILOlab/cypro documentation built on April 5, 2022, 2:03 a.m.