# \donttest{
X=as.matrix(wine[,4:21])
Y=cbind(Factor2Binary(wine[,1])[,1], Factor2Binary(wine[,2])[,1])
rownames(Y)=wine[,3]
colnames(Y)=c("Year", "Origin")
pls=PLSRBin(Y,X, penalization=0.1, show=TRUE, S=2)
plsbip=Biplot.PLSRBIN(pls, BinBiplotType=1)
plsbip=AddCluster2Biplot(plsbip, ClusterType = "us",
Groups = wine$Group)
plot(plsbip, margin=0.05, mode="s", PlotClus = TRUE,
ModeSupBinVars = "s", ShowAxis = FALSE,
ColorSupBinVars = "blue", CexInd=0.5,
ClustCenters = TRUE, LabelInd = FALSE, ShowBox = TRUE)
# }
Run the code above in your browser using DataLab