cnDot: Network Description File

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

Description

The function generates a dot-file, the native storage format for Graphviz software package, that describes the graph structure of a catNetwork object.

Usage

1
 cnDot(object, file=NULL, format="ps", nodestyle=NULL, edgestyle=NULL)

Arguments

object

a catNetwork, a list of catNetworks or a parent matrix

file

a character, an optional output file name

format

a character, an optional output file format, "ps" or "pdf"

nodestyle

a list of triplets, nodes' shape, color and edge-color

edgestyle

a list of triplets, nodes' shape, color and edge-color

Details

The function generates a dot-text file as supported by Graphviz library. In order to draw a graph the user needs a dot-file converter and pdf/postscript viewer. The environment variables R_DOTVIEWER and R_PDFVIEWER specify the corresponding executable routines.

If Graphviz is installed and the variable R_DOTVIEWER is set with the full path to the dot executable file (the routine that converts a dot-text file to a postscript or pdf), a pdf or postscript file is created depending on the value of the format parameter.

If the file variable is not specified, then the function just prints out the resulting string which otherwise would be written into a dot file. Next, if a pdf-viewer is available, the created postscript or pdf file is shown.

Value

A character or a dot-file

Author(s)

N. Balov

See Also

sdnet-package, cnPlot

Examples

1
2
  cnet <- cnRandomCatnet(numnodes=10, maxpars=3, numcats=2)
  cnDot(object=cnet, file="cnet")

Example output



sdnet documentation built on May 2, 2019, 12:43 a.m.