Ragraph-class           package:Rgraphviz           R Documentation

_C_l_a_s_s "_R_a_g_r_a_p_h": _A _c_l_a_s_s _t_o _h_a_n_d_l_e _l_i_b_g_r_a_p_h _r_e_p_r_e_s_e_n_t_a_t_i_o_n_s

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

     Class 'Ragraph' is used to handle libgraph representations of R
     graph objects.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls to the function 'agopen'.

_S_l_o_t_s:

     '_a_g_r_a_p_h': Object of class '"externalptr"': A C based structure
          containing the libgraph information

     '_l_a_i_d_o_u_t': Object of class '"logical"': Whether or not this graph
          has been laid out or not.

     '_l_a_y_o_u_t_T_y_p_e': Object of class '"character"': The layout method
          used for this object

     '_e_d_g_e_m_o_d_e': Object of class '"character"': The edgemode for this
          graph - "directed" or "undirected"

     '_A_g_N_o_d_e': Object of class '"list"': A list of 'AgNode' objects.

     '_A_g_E_d_g_e': Object of class '"list"': A list of 'AgEdge' objects.

     '_b_o_u_n_d_B_o_x': Object of class '"boundBox"': Defines the bounding box
          of the plot.

_M_e_t_h_o_d_s:

     _s_h_o_w 'signature(object = "Ragraph")': A brief summary of the
          contents

     _a_g_r_a_p_h 'signature(object = "Ragraph")': Returns the external
          libgraph pointer

     _l_a_i_d_o_u_t 'signature(object = "Ragraph")': Returns the 'laidout'
          slot

     _b_o_u_n_d_B_o_x 'signature(object = "Ragraph")': Returns the bounding
          box.

     _A_g_E_d_g_e 'signature(object = "Ragraph")': Returns the edge list.

     _A_g_N_o_d_e 'signature(object = "Ragraph")': Returns the node list.

     _e_d_g_e_m_o_d_e 'signature(object = "Ragraph")': Retrieves the edgemode
          of this object.

     _l_a_y_o_u_t_T_y_p_e 'signature(object = "Ragraph")': Retrieves the method
          used for the layout of this graph.

     _e_d_g_e_N_a_m_e_s 'signature(object = "Ragraph")': Returns a vector of the
          names of the edges in this graph.

     _g_r_a_p_h_D_a_t_a_D_e_f_a_u_l_t_s 'signature(self= "Ragraph")':  Gets default
          attributes of the given graph.

     _g_r_a_p_h_D_a_t_a_D_e_f_a_u_l_t_s<- 'signature(self= "Ragraph", attr="vector",
          value="vector")':  Sets default attributes of the given
          graph.

     _g_r_a_p_h_D_a_t_a 'signature(self= "Ragraph", attr="vector")':  Gets
          attributes of the given graph.

     _g_r_a_p_h_D_a_t_a<- 'signature(self= "Ragraph", attr="vector",
          value="vector")':  Sets attributes of the given graph.

     _c_l_u_s_t_e_r_D_a_t_a 'signature(self= "Ragraph", cluster="numeric",
          attr="vector")':  Gets attributes of a cluster for the given
          graph.

     _c_l_u_s_t_e_r_D_a_t_a<- 'signature(self= "Ragraph", cluster="numeric",
          attr="vector", value="vector")':  Sets attributes of a
          cluster for the given graph.

     _e_d_g_e_D_a_t_a_D_e_f_a_u_l_t_s 'signature(self= "Ragraph",attr="missing")': 
          Gets default attributes of the given edge.

     _e_d_g_e_D_a_t_a_D_e_f_a_u_l_t_s<- 'signature(self= "Ragraph", attr="vector",
          value="vector")':  Sets default attributes of the given edge.

     _e_d_g_e_D_a_t_a 'signature(self= "Ragraph", from="vector", to="vector",
          attr="vector")':  Gets attributes of the given edge.

     _e_d_g_e_D_a_t_a<- 'signature(self= "Ragraph", from="vector", to="vector",
          attr="vector", value="vector")':  Sets attributes of the
          given edge.

     _n_o_d_e_D_a_t_a_D_e_f_a_u_l_t_s 'signature(self= "Ragraph",attr="missing")': 
          Gets default attributes of the given node.

     _n_o_d_e_D_a_t_a_D_e_f_a_u_l_t_s<- 'signature(self= "Ragraph", attr="vector",
          value="vector")':  Sets default attributes of the given node.

     _n_o_d_e_D_a_t_a 'signature(self= "Ragraph", n="vector", attr="vector")': 
          Gets attributes of the given node.

     _n_o_d_e_D_a_t_a<- 'signature(self= "Ragraph", n="vector", attr="vector",
          value="vector")':  Sets attributes of the given node.

     _g_e_t_N_o_d_e_X_Y 'signature(object = "Ragraph")': Returns a two element
          list, the first element contains a numerical vector with the
          'x' positions of every node in this graph, and the second
          element contains a numerical vector with the 'y' positions
          for every node in the graph.

     _g_e_t_N_o_d_e_H_e_i_g_h_t 'signature(object = "Ragraph")': Returns a vector
          with the heights of every node in the graph

     _g_e_t_N_o_d_e_L_W 'signature(object = "Ragraph")': Returns a vector with
          the left width of every node in the graph.

     _g_e_t_N_o_d_e_R_W 'signature(object = "Ragraph")': Returns a vector with
          the right width of every node in the graph.

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

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

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

     'agopen'

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

     set.seed(123)
     V <- letters[1:10]
     M <- 1:4
     g1 <- randomGraph(V, M, .2)
     z <- agopen(g1,"foo")
     z

     ## The various methods in action

     ## These methods are all used to obtain positional information about nodes
     getNodeXY(z)
     getNodeHeight(z)
     getNodeLW(z)
     getNodeRW(z)

     ## Retrieve information about the edges in the graph
     edgeNames(z)
     edgemode(z)

     ## These get information about the layout
     laidout(z)
     layoutType(z)
     boundBox(z)

     ## Used to retrieve the entire list of edges or nodes
     AgEdge(z)
     AgNode(z)

