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.
MST5 is a convinience wrapper for the 5-MST.
MST(dists, K = 1)
MST5(dists)
dists |
Distance matrix as |
K |
Component number (default: |
For more details see mstree.
Object of class neig.
CCS, CF, FR, ZC
set.seed(1234)
X1 <- matrix(rnorm(20), ncol = 2)
X2 <- matrix(rnorm(20, mean = 0.5), ncol = 2)
dists <- stats::dist(rbind(X1, X2))
if(requireNamespace("ade4", quietly = TRUE)) {
# MST
MST(dists)
# 5-MST
MST5(dists)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.