data(wine)
gr <- wine[,1]
# select a subset of variables
x <- wine[, c(2,5,8)]
#clustering
cl <- pdfCluster(x)
plot(cl, which=3, stage=2)
table(cl@clusters, gr)
#set "B" for Barolo, "G" for Grignolino, "A" for Barbera
plot(cl, pch=c("B", "G", "A"), col=c(3,4,5))
Run the code above in your browser using DataLab