Skip to contents

Create a bar plot comparing correlation values across conditions.

Usage

plot_correlation_difference(
  x,
  cor_cols = c("XR", "YR"),
  t_col,
  p_col,
  facet_col = NULL,
  facet_levels = NULL,
  x_label = NULL,
  y_label = NULL,
  title = NULL,
  point_size = 0.5
)

Arguments

x

A data.frame or data.table with required columns.

cor_cols

Two columns with correlation values to compare.

t_col

Column with T statistic values for annotation.

p_col

Column with p-values for annotation.

facet_col

Optional column to use for faceting.

facet_levels

Optional facet values to include in plot.

x_label

Label for the x-axis (default is NULL).

y_label

Label for the y-axis (default is NULL).

title

Optional plot title.

Value

A ggplot2 object showing the correlation comparison.