graph.structure            package:igraph            R Documentation

_M_e_t_h_o_d _f_o_r _s_t_r_u_c_t_u_r_a_l _m_a_n_i_p_u_l_a_t_i_o_n _o_f _g_r_a_p_h_s

_D_e_s_c_r_i_p_t_i_o_n:

     These are the methods for simple manipulation of graphs: adding
     and deleting edges and vertices.

_U_s_a_g_e:

     add.edges(graph, edges, ..., attr=list())
     add.vertices(graph, nv, ..., attr=list())
     delete.edges(graph, edges)
     delete.vertices(graph, v)

_A_r_g_u_m_e_n_t_s:

   graph: The graph to work on.

   edges: Edge sequence, the edges to remove.

     ...: Additional parameters will be added as edge/vertex
          attributes. Note that these arguments have to be named.

    attr: Additional edge/vertex attributes to add. This will be
          concatenated to the other supplied attributes.

      nv: Numeric constant, the number of vertices to add.

       v: Vector sequence, the vertices to remove.

_D_e_t_a_i_l_s:

     'add.edges' adds the specified edges to the graph. The ids of the
     vertices are preserved. The additionally supplied named arguments
     will be added as edge attributes for the new edges. If an
     attribute was not present in the original graph, its value for the
     original edges will be 'NA'.

     'add.vertices' adds the specified number of isolate vertices to
     the graph. The ids of the old vertices are preserved. The
     additionally supplied named arguments will be added as vertex
     attributes for the new vertices. If an attribute was not present
     in the original graph, its value is set to 'NA' for the original
     vertices.

     'delete.edges' removes the specified edges from the graph. If a
     specified edge is not present, the function gives an error
     message, and the original graph remains unchanged. The ids of the
     vertices are preserved.

     'delete.vertices' removes the specified vertices from the graph
     together with their adjacent edges. The ids of the vertices are
     _not_ preserved.

_V_a_l_u_e:

     The new graph.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_E_x_a_m_p_l_e_s:

     g <- graph.ring(10)
     add.edges(g, c(1,5,2,6) )
     delete.edges(g, E(g, P=c(0,9, 1,2)) )
     delete.vertices(g, c(1,6,7) )

