plotPC function

Function to plot the selected number of principal components

Function to plot the selected number of principal components

This functions plots the percentage variability explained the first one hundred (or pcaComp) pricipal components of the PCA performed in the function pruneKnn if the parameter large was TRUE. The selected number of principal components (if pcaComp was NULL) is determined by an elbow criterion and highlighted by a blue circle.

plotPC(res, logDiff = FALSE)

Arguments

  • res: List object with k nearest neighbour information returned by pruneKnn function.
  • logDiff: logical. If TRUE, then plot log2 of the difference in variability explained by PC i and PC i+1.
  • Maintainer: Dominic Grün
  • License: GPL-3
  • Last published: 2024-11-24

Useful links