plot_aligned_trajectories: Render date-aligned trajectories for a pair of taxa and a...

View source: R/visuals.R

plot_aligned_trajectoriesR Documentation

Render date-aligned trajectories for a pair of taxa and a given set of hosts. This allows us to eyeball whether taxa strongly correlated within hosts show similar dynamics across hosts.

Description

Render date-aligned trajectories for a pair of taxa and a given set of hosts. This allows us to eyeball whether taxa strongly correlated within hosts show similar dynamics across hosts.

Usage

plot_aligned_trajectories(
  output_dir,
  tax_idx1,
  tax_idx2,
  tax_label1,
  tax_label2,
  metadata,
  bind_taxa = FALSE,
  return_plot = FALSE,
  file_tag = NULL
)

Arguments

output_dir

specifies the subdirectory of the model fits directory in which to save the predictions

tax_idx1

index of first taxon

tax_idx2

index of second taxon

tax_label1

readable label for first taxon

tax_label2

readable label for second taxon

metadata

metadata data.frame (with sname and collection_date column)

bind_taxa

plot all trajectories for taxon 1 together; ditto taxon 2

return_plot

if TRUE, returns the ggplot2 object instead of saving it

file_tag

if not NULL, a tag to append to the saved filename


kimberlyroche/rulesoflife documentation built on May 7, 2023, 11:08 a.m.