plotbeta: plot beta diversity

View source: R/plot.R

plotbetaR Documentation

plot beta diversity

Description

plot beta diversity

Usage

plotbeta(
  physeq,
  group,
  shape = NULL,
  distance = "bray",
  method = "PCoA",
  color = NULL,
  size = 3,
  ellipse = FALSE
)

Arguments

physeq

A phyloseq object containing merged information of abundance, taxonomic assignment, sample data including the measured variables and categorical information of the samples, and / or phylogenetic tree if available.

group

(Required). Character string specifying name of a categorical variable that is preferred for grouping the information. information.

shape

shape(Optional) Character string specifying shape of a categorical variable

distance

A string character specifying dissimilarity index to be used in calculating pairwise distances (Default index is "bray".). "unifrac","wunifrac","manhattan", "euclidean", "canberra", "bray", "kulczynski", "jaccard", "gower", "altGower", "morisita", "horn", "mountford", "raup" , "binomial", "chao", "cao" or "mahalanobis".

method

A character string specifying ordination method. All methods available to the ordinate function of phyloseq are acceptable here as well.

color

user defined color for group

size

the point size

ellipse

draw ellipse or not

Value

ggplot2 object

Author(s)

Kai Guo

Examples

{
data("Physeq")
phy<-normalize(physeq)
plotbeta(phy,group="SampleType")
}

microbial documentation built on May 29, 2024, 5:51 a.m.