(Required). Phylogenetic sequencing data
(phyloseq-class).
The data on which you want to perform the ordination.
formula
(Required). A formula, specifying the input.
No need to directly access components. capscale.phyloseq understands
where to find the abundance table (LHS) and sample_data (RHS)
from within the phyloseq object.
distance
(Required). A character string, specifying
the name of the dissimilarity (or distance) method supported by
the phyloseq distance function.
Alternatively, a pre-computed dist-object can be provided here,
in which case it supersedes any use of the otu_table
in your phyloseq object.
Note that capscale
with Euclidean distances will be identical to rda
in eigenvalues and in site, species, and biplot scores
(except for possible sign reversal). However, it makes no sense to use
capscale with Euclidean distances,
since direct use of rda is much more efficient
(and supported in the ordinate function with method=="RDA")
Even with non-Euclidean dissimilarities,
the rest of the analysis will be metric and linear.
...
(Optional). Additional named arguments passed to
capscale.
Value
Ordination object defined by capscale.
See Also
plot_ordination
rda
capscale
Examples
# See other examples at
# http://joey711.github.io/phyloseq/plot_ordination-examples
data(GlobalPatterns)
GP = prune_taxa(names(sort(taxa_sums(GlobalPatterns), TRUE)[1:50]), GlobalPatterns)
ordcap = ordinate(GP, "CAP", "bray", ~SampleType)
plot_ordination(GP, ordcap, "samples", color="SampleType")
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(phyloseq)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/phyloseq/capscale-phyloseq-methods.Rd_%03d_medium.png", width=480, height=480)
> ### Name: capscale.phyloseq
> ### Title: Constrained Analysis of Principal Coordinates, 'capscale'.
> ### Aliases: capscale.phyloseq
> ### capscale.phyloseq,phyloseq,formula,character-method
> ### capscale.phyloseq,phyloseq,formula,dist-method
> ### Keywords: internal
>
> ### ** Examples
>
> # See other examples at
> # http://joey711.github.io/phyloseq/plot_ordination-examples
> data(GlobalPatterns)
> GP = prune_taxa(names(sort(taxa_sums(GlobalPatterns), TRUE)[1:50]), GlobalPatterns)
> ordcap = ordinate(GP, "CAP", "bray", ~SampleType)
> plot_ordination(GP, ordcap, "samples", color="SampleType")
>
>
>
>
>
> dev.off()
null device
1
>