PCO: Principal Coordinates Analysis

View source: R/PCO.r

PCOR Documentation

Principal Coordinates Analysis

Description

Function that performs Principal Coordinates Analysis on abundance matrix.

Usage

PCO(x, dim, distfun)

## Default S3 method:
PCO(x, dim = 3)

## S3 method for class 'Dataset'
PCO(x, dim = 3, distfun = dist)

Arguments

x

Distance matrix, must be a dist object, or a Dataset object. See create_dataset for more information.

dim

Number of dimensions to return.

distfun

Function that calculates distance matrix for abundance table in Dataset object.

Details

This is the same as function pco from the labdsv, but it includes a Dataset method.

Value

A PCO object as defined by the pco function.

Author(s)

Sur from Dangl Lab.

See Also

create_dataset, pca, PCA, pco, dsvdis

Examples

data(Rhizo)
data(Rhizo.map)
Dat <- create_dataset(Rhizo,Rhizo.map)

# distfun <- function(x) vegan::vegdist(x,method="bray") #requires vegan package
distfun <- dist

Dat.pco <- PCO(Dat,dim=2,distfun=distfun)
summary(Dat.pco)
plotgg(Dat.pco)
plotgg(Dat.pco,shape="fraction",point_size=3)
plotgg(Dat.pco,shape="fraction",col="accession",point_size=4)

surh/AMOR documentation built on Feb. 21, 2023, 6:31 a.m.