# NOT RUN {
## Load Swiss banknotes data
data(banknote)
x <- banknote[,-1]
## Perform rimle clustering with default arguments
set.seed(1)
a <- rimle(data = x, G = 2)
print(a)
## Plot clustering
plot(a, data = x, what = "clustering")
## Plot clustering on selected margins
plot(a, data = x, what = "clustering", margins = 4:6)
## Plot clustering on the first two principal components
z <- scale(x) %*% eigen(cor(x), symmetric = TRUE)$vectors
colnames(z) <- paste("PC", 1:ncol(z), sep = "")
plot(a, data = z, what = "clustering", margins = 1:2)
## Fit plot for all clusters
plot(a, what = "fit")
## Fit plot for cluster 1
plot(a, what = "fit", cluster = 1)
# }
Run the code above in your browser using DataLab