View source: R/method-mp_cal_pcoa.R
get_pcoa | 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
## Not run:
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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.