plot_cuperdec: Plot cumulative percent decay curves

Description Usage Arguments Value Examples

View source: R/plotting.R

Description

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

Usage

1
2
3
4
5
6
7
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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)

cuperdec documentation built on Sept. 13, 2021, 1:06 a.m.