calculatePCAs: Function to compute the PCAs for a given distance matrix

Description Usage Arguments Value Examples

View source: R/inter_functions.R

Description

Function to compute the PCAs for a given distance matrix

Usage

1
calculatePCAs(distmat, pcas)

Arguments

distmat

the distance matrix

pcas

2-element vector of PCAs to include in results

Value

the x slot limited to pcas after calling stats::prcomp on distmat

Examples

1
2
3
4
data("mouseData", package = "metagenomeSeq")
aggdat <- aggFeatures(mouseData, level = "genus")
distmat <- computeDistMat(aggdat, dist_method = "bray")
calculatePCAs(distmat, c(1,2))

microbiomeExplorer documentation built on Nov. 8, 2020, 8:16 p.m.