plot_bivariate: Bivariate Plot

View source: R/module_ggbiv.R

plot_bivariateR Documentation

Bivariate Plot

Description

Create a scatter or boxplot from a tomic dataset.

Usage

plot_bivariate(
  tomic_table,
  x_var,
  y_var,
  color_var = NULL,
  shape_var = NULL,
  alpha_var = NULL,
  size_var = NULL
)

Arguments

tomic_table

A table taken from a tidy (i.e., augmented measurements) or triple omic dataset

x_var

x-axis variable

y_var

y-axis variable

color_var

coloring variable (NULL to suppress coloring)

shape_var

shape variable (NULL to suppress shape)

alpha_var

alpha variable or numeric for constant alpha (NULL to suppress alpha)

size_var

size variable or integer/numeric for constant size (NULL to suppress size)

Value

a ggplot2 grob

Examples

library(dplyr)

brauer_augmented <- brauer_2008_tidy %>%
  add_pcs(npcs = 5) %>%
  tomic_to("triple_omic")

tomic_table <- brauer_augmented$samples
plot_bivariate(tomic_table, "PC1", "PC2", "nutrient", "nutrient", 0.5, 10)
plot_bivariate(tomic_table, "PC1", "PC2", NULL)
plot_bivariate(tomic_table, "nutrient", "PC2", "nutrient")

romic documentation built on Sept. 21, 2023, 9:06 a.m.