edgeTrimmer {gtkWidgets} | R Documentation |
The widget shows a graph in a drawing area associated with a slider for trimming graph edges based on the value set by the slider. Edges with wieght values less than the value set by the slider will be trimmed off and those that are left will be redrawn.
edgeTrimmer(graph)
graph |
graph a object of the class distGraph |
graph
has to be an object of the class distGraph. The widget
creates a RaGraph with the layout of nodes determined. When a
threshold value has been selected by a user to trime off edges, the
system just has to redraw the graph without having to figure out the
layout.
The widget returns invisible()
Jianhua Zhang
Documentations for the graph and Rgraphviz packages
if(interactive()){ if(all(require(RGtk), require(graph), require(Rgraphviz), require(gtkDevice))){ x <- rnorm(10) names(x) <- letters[1:10] dG <- new("distGraph", Dist = dist(x)) edgeTrimmer(dG) } }