Learn R Programming

RnavGraph (version 0.1.8)

ng_walk: Walk a path on the current graph in a navGraph session

Description

If you create a path outside the navGraph session, you can let navGraph walk you path.

A path has to be a sequence of node names of adjoining nodes in the current shown graph.

If a path has been walked through, it gets added to the activePath in the path tool of the running navGraph session.

Usage

ng_walk(nghandler, path)

Arguments

nghandler
navGraph handler of a running navGraph session.
path
Vector of node names that are adjoining in the current graph. A single character string with the node names separated by a space also works.

See Also

navGraph

Examples

Run this code
## Define a NG_data object
ng.iris <- ng_data(name = "iris", data = iris[,1:4],
		shortnames = c('s.L', 's.W', 'p.L', 'p.W'))

## start a navGraph session
nav <- navGraph(ng.iris)

## Find linegraph
LG <- linegraph(completegraph(shortnames(ng.iris)))

## find a path
library(PairViz)
path = eulerian(LG)

## walk the path
ng_walk(nav,path)

Run the code above in your browser using DataLab