View source: R/helper_functions_gTests.R
MST | R Documentation |
Calculte the edge matrix of a minimum spanning tree based on a distance matrix, used as helper functions in CCS
, CF
, FR
, and ZC
.
This function is a wrapper around mstree
.
MST(dists, K = 1)
dists |
Distance matrix as |
K |
Component number (default: |
For more details see mstree
.
Object of class neig
.
CCS
, CF
, FR
, ZC
X1 <- matrix(rnorm(1000), ncol = 10)
X2 <- matrix(rnorm(1000, mean = 0.5), ncol = 10)
dists <- stats::dist(rbind(X1, X2))
if(requireNamespace("ade4", quietly = TRUE)) {
# MST
MST(dists)
# 5-MST
MST(dists, K = 5)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.