R/getPrincipalCoordinates.R
getPrincipalCoordinates.Rd
Calculate the principal coordinates of the samples in an ftmsData object. Uses vegdist
to calculate pairwise distances between samples, and pcoa
to calculate the principal coordinates.
getPrincipalCoordinates(ftmsObj, dist_metric = "bray", n_dims = 5)
object of type ftmsData
distance metric for computing pairwise distances between all samples. See vegdist
for options. Default is "bray".
number of dimensions to return, default is 5. Must be less than the number of samples in ftmsObj
data.frame of coordinates where each sample is a row
vegdist, pcoa
coords <- getPrincipalCoordinates(exampleProcessedPeakData, dist_metric="jaccard", n_dims=7)