Create a histogram from a tomic dataset.

plot_univariate(tomic_table, x_var, color_var = NULL)

Arguments

tomic_table

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

x_var

x-axis variable

color_var

coloring variable (NULL to suppress coloring)

Value

A ggplot2 grob

Examples

library(dplyr)

brauer_augmented <- brauer_2008_tidy %>%
  add_pca_loadings(npcs = 5) %>%
  tomic_to("triple_omic")
#> 40 features dropped due to missing values

plot_univariate(brauer_augmented$samples, "PC1", "nutrient")

plot_univariate(brauer_augmented$measurements, "expression", NULL)