Description Usage Arguments Details Value Author(s) References Examples
Render a graph in a file with given format
1 | toFile(graph, layoutType = "dot", filename, fileType = "dot")
|
graph |
an instance of the |
layoutType |
Which layout algorithm to use. Defaults to dot, and
see |
filename |
output file name |
fileType |
Output file type. Defaults to |
This function takes a given Ragraph
, does the chosen layout, then
renders the output to an external file. Users could view the output file
with corresponding viewer.
toFile
returns NULL after writing to a file.
Li Long <li.long@isb-sib.ch>
Rgraphviz by E. Ganssner, S. North, www.graphviz.org
1 2 3 4 5 6 7 8 9 10 11 | g1_gz <- gzfile(system.file("GXL/graphExample-01.gxl.gz",
package="graph"))
if(require(XML)) {
g1 <- fromGXL(g1_gz)
ag <- agopen(g1, name="test")
toFile(ag, layoutType="dot", filename="g1_dot.svg", fileType="svg")
toFile(ag, layoutType="neato", filename="g1_neato.ps", fileType="ps")
toFile(ag, layoutType="twopi", filename="g1_twopi.svg", fileType="svg")
}
|
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, basename, cbind, colnames,
dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which.max, which.min
Loading required package: grid
Loading required package: XML
Attaching package: ‘XML’
The following object is masked from ‘package:graph’:
addNode
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.