plot_indiv_paired: Create paired plot

View source: R/paired.R

plot_indiv_pairedR Documentation

Create paired plot

Description

Create paired plot

Usage

plot_indiv_paired(
  df,
  labels = "Group",
  out_dir = ".",
  font_size = 30,
  line_size = 1.3,
  color_pal = NA,
  xlab = "variable",
  ylab = "value",
  rowAnns = c(NA, NA),
  pval.test = "t.test",
  pval.label = "p.format",
  log10_y = F,
  save.to.file = T
)

Arguments

df

A data frame with 3 columns: 1) id = cases or groups to pair by, 2) box = dif levels in rowAnn, 3) value

labels

A character vector of at least length 1 that will be collapsed for file name/plot titles.

out_dir

The output directory where the plot will be saved, default is current working directory.

font_size

The size of text labels on correlation plots. legend title. The size of legend text and plot title is font_size / 1.5. The size of legend text and plot subtitle is font_size / 3.

line_size

The thickness of grid lines.

color_pal

A named vector with colors, where names are box names (values in column 2 of df).

ylab

Y axis label.

rowAnns

A character vector of 1-2 column names in ds$rowAnn.

pval.test

2-sample test to use (paired only for 2 groups). String corresponding to method parameter in stat_compare_means. Allowed values are "t.test" and "wilcox.test".

pval.label

p-value label. String corresponding to label parameter in stat_compare_means. Allowed values are "p.signif" (stars) and "p.format" (number).

save.to.file

If TRUE, save plot to file in out_dir. If FALSE, print to panel.

log10

Logical indicating whether to log10-transform values before plotting

Value

Plot object if save.to.file is FALSE.

See Also

Other plotting: plot_corrplot(), plot_corrplotgg(), plot_discrete_barplot(), plot_heatmap(), plot_het_barplot(), plot_indiv_boxplot(), plot_indiv_corrscatt(), plot_overview_boxplot(), plot_overview_corr_scatt(), plot_profile_barplot(), run_corrplot_analysis()


kazeera/hourglass documentation built on April 5, 2025, 7:18 a.m.