powered by
Tool for vector to matrix
getZmat(ZOneDim, m, n)
adjacency matrix
a vector.
the number of cluster.
sample size.
m <- 20 n <- 500 ZOneDim <- sample(seq_len(m), n, replace = TRUE) #' # \donttest{ getZmat(ZOneDim, m, n) # }
Run the code above in your browser using DataLab