edgeTrimmer {gtkWidgets}R Documentation

A RGtk widget that allow users to trime graph edges interactively

Description

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.

Usage

edgeTrimmer(graph)

Arguments

graph graph a object of the class distGraph

Details

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.

Value

The widget returns invisible()

Author(s)

Jianhua Zhang

References

Documentations for the graph and Rgraphviz packages

Examples

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)
    }
}

[Package gtkWidgets version 0.6.6 Index]