Skip to contents

Plot PCA

Usage

plotPCA(
  CS,
  featMethod,
  fitData,
  plotData,
  PCx = 1,
  PCy = 2,
  color = NULL,
  shape = NULL,
  plotBars = FALSE,
  plotArrows = FALSE,
  nLoadings = NULL
)

Arguments

CS

CytoScan object

featMethod

Which features to use

fitData

Which data to fit PCA on ("test", "reference" or "all")

plotData

Which data to plot based on PCA fit ("test", "reference" or "all")

PCx

Which PC to plot along x-axis

PCy

Which PC to plot along y-axis

color

Category used for point color ("outlier", "novelty", "labels")

shape

Category used for point shape ("outlier", "novelty", "labels")

plotBars

Whether to plot loading coefficients as bars along

plotArrows

Whether to plot loadings as arrows

nLoadings

Number of loadings to plot. Selects most influential

Value

PCA plot