\name{toFile} \alias{toFile} \title{Render a graph in a file with given format} \description{Render a graph in a file with given format} \usage{ toFile(graph, layoutType=c("dot","neato","twopi","circo","fdp"), filename, fileType=c("canon", "dot", "xdot", "dia", "fig", "gd", "gd2", "gif", "hpgl", "imap", "cmapx", "ismap", "mif", "mp", "pcl", "pdf", "pic", "plain", "plain-ext", "png", "ps", "ps2", "svg", "svgz", "vrml", "vtx", "wbmp")) } \arguments{ \item{graph}{an instance of the \code{Ragraph} class} \item{layoutType}{which layout algorithm to use} \item{filename}{output file name} \item{fileType}{output file type} } \details{ This function takes a given \code{Ragraph}, does the chosen layout, then renders the output to an external file. Users could view the output file with corresponding viewer. } \value{ \code{toFile} returns NULL after writing to a file. } \references{Rgraphviz by E. Ganssner, S. North, www.graphviz.org } \author{Li Long