pcabiplot | R Documentation |
This function creates a biplot from a pca object, which is
generated by the prcomp
function from the stats package.
pcabiplot( PC, x = "PC1", y = "PC2", var.line = TRUE, colobj = rep(1, nrow(PC$x)), o.size = 1 )
PC |
A pca object generated by |
x |
X axis (see Details). |
y |
Y axis (see Details). |
var.line |
A logical input, if variable lines are plotted. |
colobj |
A vector to provide color in the objects (see Details). |
o.size |
A numeric number to set the object size. |
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.
Function returns a plot of pca.
Weksi Budiaji
Contact: budiaji@untirta.ac.id
pcadat <- prcomp(iris[,1:4], scale. = TRUE) pcabiplot(pcadat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.