calculatePCAs {microbiomeExplorer}R Documentation

Function to compute the PCAs for a given distance matrix

Description

Function to compute the PCAs for a given distance matrix

Usage

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

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


[Package microbiomeExplorer version 1.3.0 Index]