This function creates a biplot from a pca object, which is
generated by the prcomp function from the stats package.
Usage
pcabiplot(PC, x = "PC1", y = "PC2", var.line = TRUE, colobj = rep(1,
nrow(PC$x)), o.size = 1)
Arguments
PC
A pca object generated by prcomp function.
x
X axis (seeDetails).
y
Y axis (seeDetails).
var.line
A logical input, if variable lines are plotted.
colobj
A vector to provide color in the objects (seeDetails).
o.size
A numeric number to set the object size.
Value
Function returns a plot of pca.
Details
This is a function to plot a pca biplot from a pca object. The x
and y axes can be supplied with any principle component. The length of the
colobj vector has to be equal to the number of objects. This argument
controls the color of the objects and is very convenient to explore the
clustering result. The default value is that all object have the same color.