| pcoa | R Documentation |
Performs principal coordinates analysis (PCoA) on a distance matrix generated by the dist() function. This function reads the distance matrix and item names from the DIST output files and creates a PCoA scatterplot.
pcoa(notu)
notu |
Number of operational taxonomic units (items) in the dataset. |
Invisibly returns a list with the following components:
A two-column matrix of the coordinates of the items on the first two principal coordinate axes.
The eigenvalues of the PCoA solution, as returned by
cmdscale.
A numeric vector of length 2 giving the proportion of total variance explained by Axis 1 and Axis 2 (values between 0 and 1).
A single numeric value giving the cumulative proportion of variance explained by the first two axes combined.
The full result object returned by
cmdscale, for users who need access to all
components.
# Requires the CONFOR and DIST executables on the PATH.
try({
delta <- load_delta(
system.file("extdata", "chars_viola", package = "RDelta"),
system.file("extdata", "items_viola", package = "RDelta"),
system.file("extdata", "specs_viola", package = "RDelta")
)
dist(delta)
res <- pcoa(delta$get_items_nb())
res$variance
res$cumulative
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.