phyloseq_group_dissimilarity: Pairwise dissimilarity boxplots.

View source: R/phyloseq_group_dissimilarity.R

phyloseq_group_dissimilarityR Documentation

Pairwise dissimilarity boxplots.

Description

Pairwise dissimilarity boxplots.

Usage

phyloseq_group_dissimilarity(
  physeq,
  group = NULL,
  between_groups = TRUE,
  method = "bray",
  method_title = FALSE,
  notch = TRUE,
  justDF = FALSE,
  ...
)

Arguments

physeq

A phyloseq-class object

group

Grouping variable name (contained in sample_data)

between_groups

Logical, estimate between-group dissimilarity

method

Distance/dissimilarity method (as character string; see distanceMethodList)

method_title

Logical, add method name to the plot title

notch

Logical, draw the notches at each side of the boxes

justDF

Logical, instead of returning a ggplot2-object, return the data.frame that was used to build the plot

...

Additional arguments may be passed to distance function from phyloseq package

Details

If the notches of two boxplots do not overlap this indicates that the two medians differ.

Value

ggplot2-object or data.frame (if justDF = TRUE).

Examples

## Load and subset data
data(enterotype)
ent <- subset_samples(enterotype, Enterotype %in% c("1", "2"))

## Dissimilarity boxplots
phyloseq_group_dissimilarity(ent, group = "Enterotype")
phyloseq_group_dissimilarity(ent, group = "Enterotype", between_groups = F)
phyloseq_group_dissimilarity(ent, group = "Enterotype", method = "jaccard")


vmikk/metagMisc documentation built on June 20, 2024, 7:20 a.m.