agopenSimple            package:Rgraphviz            R Documentation

_A _f_u_n_c_t_i_o_n _t_o _o_b_t_a_i_n _a _R_a_g_r_a_p_h _o_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     This function will read in a 'graphNEL' object and create a
     'Ragraph' object, returning it for use in other functions.  The
     graph represented by the 'Ragraph' can be laidout in various
     formats.

_U_s_a_g_e:

     agopenSimple(graph, name, kind = NULL, edgeMode=edgemode(graph),
            subGList=list(), recipEdges=c("combined", "distinct"))

_A_r_g_u_m_e_n_t_s:

   graph: An object of class 'graphNEL'

    name: The name of the 'Ragraph'

    kind: The type of graph

subGList: A list describing subgraphs for the graph parameter

edgeMode: Whether the graph is directed or undirected

recipEdges: How to handle reciprocated edges, defaults to 'combined',
          TODO: use this 

_D_e_t_a_i_l_s:

     'graph' is from the package 'graph-class'.

     The 'edgeMode' argument specifies whether the graph is to be laid
     out with directed or undirected edges.  This parameter defaults to
     the edgemode of the 'graph' argument. 

     The kind parameter works as follows:

     _N_U_L_L: Determine the direction of the graph from the 'graph'
          object.  This is the default and the recommended method. 

     _A_G_R_A_P_H: An undirected graph

     _A_G_D_I_G_R_A_P_H: A directed graph

     _A_G_R_A_P_H_S_T_R_I_C_T: A strict undirected graph

     _A_G_D_I_G_R_A_P_H_S_T_R_I_C_T: A strict directed graph

     Strict graphs do not allow self arcs or multi-edges.

     The 'subGList' parameter is a list describing any subgraphs, where
     each element represents a subgraph and is itself a list with up to
     three elements.  The first element, 'graph' is required and
     contains the actual 'graph' object for the subgraph.  The second
     element, 'cluster' is a logical value indicating if this is a
     'cluster' or a 'subgraph' (a value of 'TRUE' indicates a cluster,
     which is also the default value if this element is not specified).
      In Graphviz, subgraphs are more of an organizational mechanism,
     whereas clusters are laid out separately from the main graph and
     then later inserted.  The last element of the list, 'attrs' is
     used if there are any attributes for this subgraph. This is a
     named vector where the names are the attributes and the elements
     are the values for those attributes.

     The 'recipEdges' argument can be used to specify how to handle
     reciprocal edges.  The default value, 'combined' will combine any
     reciprocated edges into a single edge (and if the graph is
     directed, will by default place an arrowhead on both ends of the
     edge), while the other option is 'distinct' which will draw to
     separate edges.  Note that in the case of an undirected graph,
     every edge of a 'graphNEL' is going to be reciprocal due to
     implementation issues.

_V_a_l_u_e:

     An object of class 'Ragraph'

_A_u_t_h_o_r(_s):

     Li Long <li.long@isb-sib.ch>

_R_e_f_e_r_e_n_c_e_s:

     http://www.research.att.com/sw/tools/graphviz/

_S_e_e _A_l_s_o:

     'graphLayout', 'Ragraph', 'plot'

_E_x_a_m_p_l_e_s:

     set.seed(123)
     V <- letters[1:10]
     M <- 1:4
     g1 <- randomGraph(V, M, .2)
     z <- agopenSimple(g1,name="foo")
     if(graphvizVersion() >= "2.10") {
       ## This example will only run with Graphviz >= 2.10
       plot(z, "twopi")
     }

