##Generates a data matrix of dimension 50X20
library("amap")
library("moc.gapbk")
x <- matrix(runif(50 * 20, min = -5, max = 10), nrow = 50, ncol = 20)
##Compute two distance matrices
dmatrix1<- as.matrix(amap::Dist(x, method = "euclidean"))
dmatrix2<- as.matrix(amap::Dist(x, method = "correlation"))
##Performs MOC-GaPBK with 5 cluster
example<-moc.gabk(dmatrix1, dmatrix2, 5)
example$population
example$matrix.solutions
example$clustering
Run the code above in your browser using DataLab