distmat_ord_table: Run ordinations on a distance matrix.

distmat_ord_tableR Documentation

Run ordinations on a distance matrix.

Description

Run ordinations on a distance matrix.

Usage

distmat_ord_table(dm, ord = "PCoA", k = 2L, ...)

Arguments

dm

A dist-class distance matrix, as returned from bdiv_distmat() or stats::dist(). Required.

ord

Method for reducing dimensionality. Options are:

  • "UMAP" - Uniform manifold approximation and projection; uwot::umap().

  • "PCoA" - Principal coordinate analysis; ape::pcoa().

  • "NMDS" - Nonmetric multidimensional scaling; vegan::metaMDS().

  • "tSNE" - t-distributed stochastic neighbor embedding; tsne::tsne().

Default: "UMAP"

Multiple/abbreviated values allowed.

k

Number of ordination dimensions to return. Either 2L or 3L. Default: 2L

...

Additional arguments for ord.

Value

A data.frame with columns .sample, .ord, .x, .y, and (optionally) .z.

See Also

Other ordination: bdiv_ord_plot(), bdiv_ord_table()

Examples

    library(rbiom) 
    
    dm  <- bdiv_distmat(hmp50, "bray")
    ord <- distmat_ord_table(dm, "PCoA")
    head(ord)
    

cmmr/rbiom documentation built on April 28, 2024, 6:38 a.m.