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

View source: R/inter_functions.R

calculatePCAsR 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))


zoecastillo/microbiomeExplorer documentation built on Sept. 11, 2022, 7:40 a.m.