data(ITS1, meta)
# The argument for factors is a vector of length two; the first
# item is # Crop, which is a column from meta, and the second item
# is City, another # column from meta.
pcoa.plot(ITS1, meta=meta, rank="c",
factors=c(Crop="Crop", City="City"))
# If you want to customize legend labels and plot the top 20 taxon
# groups at genus:
pcoa.plot(ITS1, meta=meta, rank="g", main="PCoA plot",
factors=c(Place="City", Harvest_Method="Harvestmethod"))
# In black & white, using base graphics:
pcoa.plot(ITS1, meta=meta, rank="c", factors=c(Plot="Plots"),
ggplot=F, bw=T)
pcoa.plot(ITS1, meta=meta, rank="c", factors=c(Plot="Plots"),
ggplot=F, bw=T, dist.method="euc", stand.method="hell")
# Focus on the samples: hide all groups and plot ellipses for Crop:
pcoa.plot(ITS1, meta=meta, rank="g",
factors=c(Crop="Crop", City="City"),
ellipse=1, sample.labels=FALSE, top=0)
# Standardize the data before calculating distances:
pcoa.plot(ITS1, meta=meta, rank="g", factors=c(City="City"),
stand.method="chi.square",
dist.method="euclidean")Run the code above in your browser using DataLab