prunemst

0th

Percentile

Prune a Minimun Spanning Tree

This function deletes a first edge and makes two subsets of edges. Each subset is a Minimun Spanning Treee.

Keywords
cluster, tree
Usage
prunemst(edges, only.nodes = TRUE)
Arguments
edges
A matrix with two colums with each row is one edge
only.nodes
If only.nodes=FALSE, return a edges and nodes of each MST resulted. If only.nodes=TRUE, return a two sets of nodes. Defalt is TRUE
Value

A list of length two. If only.nodes=TRUE each element is a vector of nodes. If only.nodes=FALSE each element is a list with nodes and edges.

See Also

See Also as mstree

Aliases
  • prunemst
Examples
e <- matrix(c(2,3, 1,2, 3,4, 4,5), ncol=2, byrow=TRUE)
e
prunemst(e)
prunemst(e, only.nodes=FALSE)
Documentation reproduced from package spdep, version 0.6-9, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.