plotPrincipalCoordinates: Plot principal coordinates of ftmsData samples

View source: R/plotPrincipalCoordinates.R

plotPrincipalCoordinatesR Documentation

Plot principal coordinates of ftmsData samples

Description

Constructs a scatter plot of any combination of principal coordinates calculated by the getPrincipalCoordinates function. If an associated ftmsData object is provided with groups defined, the resulting plot will be colored by group membership.

Usage

plotPrincipalCoordinates(
  pcoaMat,
  x = 1,
  y = 2,
  ftmsObj = NA,
  title = NA,
  xlabel = sprintf("Principal Coordinate %d", x),
  ylabel = sprintf("Principal Coordinate %d", y),
  includeR2OnAxes = TRUE,
  size = 8
)

Arguments

pcoaMat

numeric matrix, the output of getPrincipalCoordinates

x

numeric value, which column of pcoaMat should serve as the x-axis

y

numeric value, which column of pcoaMat should serve as the y-axis

ftmsObj

optional, if provided points will be colored according to the groups defined in ftmsObj

title

optional plot title

xlabel

x-axis label

ylabel

y-axis label

includeR2OnAxes

TRUE/FALSE, should the x- and y-axis labels be appended with R^2 values?

size

plot marker size (default is 8)

Value

a plotly plot object

Examples

## Not run: 
pcoaMat <- getPrincipalCoordinates(exampleProcessedPeakData)
plotPrincipalCoordinates(pcoaMat, x=2, y=3, ftmsObj=exampleProcessedPeakData)

## End(Not run)

EMSL-Computing/fticRanalysis documentation built on Dec. 18, 2024, 9:51 p.m.