biplt: make a biplot that allows you to see the relationship between...

View source: R/biplt.R

bipltR 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

Description

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

Usage

biplt(
  pca,
  choices = c(1, 2),
  col = "blue",
  threshold = 0.25,
  xlab = "cps",
  ylab = "cps",
  cex = 2,
  pch = 16,
  labels = rownames(pca$x)
)

Arguments

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

Value

a graphic biplot more esthetic of biplot() function

Examples

# Example 1
data(iris)
a <- prcomp(iris[,1:4])
biplt(a,col=iris$Species,threshold=0.8,choices=c(1,3))

Antoine-Masse/KefiR documentation built on Feb. 22, 2024, 5:54 a.m.