Learn R Programming

fossil (version 0.4.0)

dino.mst: Calculate a Minimum Spanning Tree or Network

Description

Methods for calculating a minimum spanning tree or network between a number of points given a distance matrix.

Usage

dino.mst(x, random.start = TRUE, random.search = TRUE)
dino.msn(x)

Arguments

x

a distance matrix for any number of points

random.start

If the minimum spanning tree is to start at a random point and not the first given site (default is TRUE)

random.search

If there is more than one shortest possible branch, should one be chosen randomly

Value

Returns a binary matrix where connections between points are denoted by a 1.

Details

Ensure that a distance matrix is used, and not a similarity matrix, otherwise the result given will be highly incorrect.

See Also

dino.dist

Examples

Run this code
# NOT RUN {
#minimum spanning tree for the fdata set
data(fdata.mat)
fdata.dist<-dino.dist(fdata.mat)
dino.mst<-dino.mst(fdata.dist)
# }

Run the code above in your browser using DataLab