Learn R Programming

RaceID (version 0.3.9)

plotPC: Function to plot the selected number of principal components

Description

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.

Usage

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.