ng_graph: Create an NG_data object to be used by a navGraph session

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/ng_graph.R

Description

NG_graph objects wrap the transition graphs and additional information such as graph name and graph layout.

The node names of the graph split by the chosen sep character sting must match either the variable names- or the short names of the NG_data object.

Usage

1
ng_graph(name, graph, sep = ":", layout = "circle")

Arguments

name

Name of graph. This name will be displayed in the pull down menu within a navGraph session.

graph

Undirected graph objects of class graph. See the package graph.

sep

Node names represent a set of variables whose name are separated by the character string sep (containing no spaces).

layout

One of the following strings: "circle", "kamadaKawaiSpring", "fruchtermanReingold" or "random".

Details

The number of sep occurrences in each node name of the graph must be the same.

Value

NG_graph object.

Author(s)

Adrian Waddell and R. Wayne Oldford

See Also

navGraph, newgraph, completegraph, linegraph, complement, ng_get-methods, ng_set-methods

Examples

1
2
3
4
5
6
7
8
9
G <- completegraph(LETTERS[1:4])
LG <- linegraph(G, sep = "++")

ng.lg <- ng_graph("3d transition", LG, "++", "fruchtermanReingold" )
plot(ng.lg)

## If you have the Rgraphviz package working, plot graph object of class graph
## Not run: library(Rgraphviz)
## Not run: plot(LG)

RnavGraph documentation built on May 29, 2017, 4:18 p.m.