| mstlines | R Documentation |
a method of displaying a Minimum Spanning Tree/Network over a given set of points
mstlines(mst, x, y = NULL, pts.names = NULL, ...)
mst |
a minimum spanning tree or network object |
x |
either a table with the first two columns that of the x and y coordinates respectively, or simply that of the x coordinate |
y |
an optional argument if the y coordinates were not given in argument x |
pts.names |
If there is more than one shortest possible branch, should one be chosen randomly |
... |
arguments to be passed to lines() |
A function to plot the lines of a minimum spanning tree/forest on a plot; works as a frontend for lines.
Matthew Vavrek
dino.dist
#plot with overlain MST for fdata dataset data(fdata.lats) data(fdata.mat) fdata.dist<-dino.dist(fdata.mat) fdata.mst<-dino.mst(fdata.dist) plot(coordinates(fdata.lats)) mstlines(fdata.mst, coordinates(fdata.lats))