Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

agwrite

Read / write Ragraph objects


Description

These functions will write an Ragraph object to or from a file.

Usage

agwrite(graph, filename)
agread(filename, layoutType="dot", layout=TRUE)

Arguments

graph

An object of class Ragraph

filename

The input or output filename

layoutType

character(1) specifying the format of the input file. must be one of graphvizCapabilities()$layoutTypes.

layout

logical(1) indicating whether graphLayout is to be called on the result of file input.

Details

These function are wrappers to agwrite() and agread() calls in Graphviz.

Author(s)

Jeff Gentry

See Also

Examples

V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, .2)
z <- agopen(g1, "foo", layout=FALSE) ## default layoutType 'dot'
file <- tempfile()
agwrite(z, file)


## supported input types
graphvizCapabilities()$layoutTypes
g2 <- agread(file, layout=TRUE)
if (interactive())
   plot(g2)

Rgraphviz

Provides plotting capabilities for R graph objects

v2.34.0
EPL
Authors
Kasper Daniel Hansen [cre, aut], Jeff Gentry [aut], Li Long [aut], Robert Gentleman [aut], Seth Falcon [aut], Florian Hahne [aut], Deepayan Sarkar [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.