plot_cuperdec {cuperdec}R Documentation

Plot cumulative percent decay curves

Description

Generates visual representation of curves, with optional separate plotting of different groups, and also indication of individuals passing different on types filters.

Usage

plot_cuperdec(
  curves,
  metadata,
  burnin_result,
  restrict_x = 0,
  facet_cols = NULL
)

Arguments

curves

Output tibble from calculate_curve.

metadata

Output from load_map.

burnin_result

Output from apply_*_burnin. functions (optional).

restrict_x

Restrict viewing of abundance rank to X number of ranks (useful for closer inspection of curves) (optional).

facet_cols

Custom number of columns for faceted plots (optional).

Value

A ggplot2 image object.

Examples

data(cuperdec_taxatable_ex)
data(cuperdec_database_ex)
data(cuperdec_metadata_ex)

taxa_table <- load_taxa_table(cuperdec_taxatable_ex)
iso_database <- load_database(cuperdec_database_ex, target = "oral")
metadata_table <- load_map(cuperdec_metadata_ex,
  sample_col = "#SampleID",
  source_col = "Env"
)

curves <- calculate_curve(taxa_table, iso_database)
burnin_results <- adaptive_burnin_filter(curves, percent_threshold = 0.1)

plot_cuperdec(curves, metadata_table, burnin_results)

[Package cuperdec version 1.1.0 Index]