Description Usage Arguments Value Author(s) Examples
View source: R/method-get-pcoa.R
performs principal coordinate analysis (PCoA)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 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
1 2 3 4 5 6 7 8 9 10 11 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.