get_pcoa {MicrobiotaProcess} | R Documentation |
performs principal coordinate analysis (PCoA)
get_pcoa(obj, ...) ## S3 method for class 'data.frame' get_pcoa( obj, distmethod = "euclidean", taxa_are_rows = FALSE, sampleda = NULL, tree = NULL, method = "hellinger", ... ) ## S3 method for class 'dist' get_pcoa( obj, distmethod, data = NULL, sampleda = NULL, method = "hellinger", ... ) ## S3 method for class 'phyloseq' get_pcoa(obj, distmethod = "euclidean", ...)
obj |
phyloseq, the phyloseq class or dist class. |
..., |
additional parameter, see also
|
distmethod |
character, the method of distance,
see also |
taxa_are_rows |
logical, if feature of data is column, it should be set FALSE. |
sampleda |
data.frame, nrow sample * ncol factor, default is NULL. |
tree |
phylo, the phylo class, default is NULL, when use unifrac method, it should be required. |
method |
character, the standardization method for community ecologists, default is hellinger, if the data has be normlized, it shound be set NULL. |
data |
data.frame, numeric data.frame nrow sample * ncol features. |
pcasample object, contained prcomp or pcoa and sampleda (data.frame).
Shuangbin Xu
library(phyloseq) data(GlobalPatterns) subGlobal <- subset_samples(GlobalPatterns, SampleType %in% c("Feces", "Mock", "Ocean", "Skin")) #pcoares <- get_pcoa(subGlobal, # distmethod="euclidean", # method="hellinger") # pcoaplot <- ggordpoint(pcoares, biplot=FALSE, # speciesannot=FALSE, # factorNames=c("SampleType"), # ellipse=FALSE)