plotPrim {locationgamer}R Documentation

Plotting minimum spanning tree connecting all vertexes

Description

Plotting minimum spanning tree connecting all vertexes

Usage

plotPrim(minimumSp, coordMat)

Arguments

minimumSp

A data frame in which each row corresponds to an edge between two numbered vertexes Use function primDistance to obtain minimum spanning tree using Prim's algorithm.

coordMat

A matrix containing all the x and y coordinates of the network vertexes.

Examples

minimumSp <- matrix(c(1,4,4,3,2,3),ncol = 2)
coordMatrix <- matrix(c(0,10,15,20,30,30,15,15),ncol = 2)
plotPrim(minimumSp, coordMatrix)


[Package locationgamer version 0.1.0 Index]