Learn R Programming

spdep (version 1.3-7)

prunemst: Prune a Minimun Spanning Tree

Description

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

Usage

prunemst(edges, only.nodes = TRUE)

Arguments

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

Examples

Run this code
e <- matrix(c(2,3, 1,2, 3,4, 4,5), ncol=2, byrow=TRUE)
e
prunemst(e)
prunemst(e, only.nodes=FALSE)

Run the code above in your browser using DataLab