pcoaplus: Principal coordinates analysis, plus

View source: R/ordination.R

pcoaplusR Documentation

Principal coordinates analysis, plus

Description

Principal coordinates analysis, plus

Usage

pcoaplus(data, distmat, sample_id_var = SampleID, num_axes = 2)

## S3 method for class 'pcoaplus'
plot(x, ...)

Arguments

data

A data frame giving information on the objects for the PCoA.

distmat

A matrix or dist object giving the distances between objects in data. The distance matrix can contain distances between additional objects not found in data, but if any of the objects in data is missing, an error will occur.

sample_id_var

The column in data that gives the identifiers for each row, used to find the matching distances in distmat.

num_axes

The number of PCoA axes to return in the output.

x

A tibble returned by pcoaplus.

...

Additional aesthetic mappings for ggplot.

Value

For pcoaplus, a tibble with new columns giving the position of each object along the principal coordinate axes. We add an additional class to the resultant tibble ("pcoaplus") to facilitate plotting. The attribute "pctvar" gives the percent variation explained by each principal coordinate axis. The attribute "axislabel" contains formatted axis labels for plotting.

For plot.pcoaplus, a ggplot object.

Methods (by generic)

  • plot(pcoaplus): Make a principal coordinates scatter plot


ctanes/miscStats documentation built on Nov. 24, 2024, 1:38 p.m.