# NOT RUN {
# parameters
n <- 10 # number of observations
K <- 3 # number of clusters (mixture components)
pi <- rep(1/K,K) # cluster membership probability
z <- sample(1:K, size = n, replace = TRUE, prob = pi) # cluster indicators
z <- remap_canonical2(z)
# }
Run the code above in your browser using DataLab