biplt | R Documentation |
make a biplot that allows you to see the relationship between two components of a PCA, the weight of the respective variables and to color by category pca, =c(1,2), ="blue", =0.25,xlab="cps",ylab="cps",cex=2,pch
biplt(
pca,
choices = c(1, 2),
col = "blue",
threshold = 0.25,
xlab = "cps",
ylab = "cps",
cex = 2,
pch = 16,
labels = rownames(pca$x)
)
pca |
a list with class "prcomp" from prcomp() |
choices |
a vector indicating the indices of two desired components that we wish to relate |
col |
a vector of color |
threshold |
the elimination threshold to avoid displaying the variables that have the least influence on the components |
xlab |
label of x |
ylab |
label if y |
cex |
length of points |
pch |
pitch type |
a graphic biplot more esthetic of biplot() function
# Example 1
data(iris)
a <- prcomp(iris[,1:4])
biplt(a,col=iris$Species,threshold=0.8,choices=c(1,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.