Suppose that I have a 2-dimensional dataset, a and b:
a
b
a<-replicate(10,sample(9,5)) a [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]