removeEdge               package:graph               R Documentation

_r_e_m_o_v_e_E_d_g_e

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

     A function to remove the specified edges from a graph.

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

     removeEdge(from, to, graph)

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

    from: from edge labels 

      to: to edge labels

   graph: a 'graph' object 

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

     The edges in the graph from nodes in the 'from' set to the 'to'
     set are removed and a new graph object returned. Both 'from' and
     'to' can be vectors, not necessarily of the same length (in which
     case standard rules for replicating the shorter one apply).

     If the graph is 'undirected' then the undirected edge is removed.

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

     A new instance of a graph with the same class as 'graph' is
     returned. Any of the listed edges in 'graph' have been removed.

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

     R. Gentleman

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

     'addNode','addEdge','removeNode',

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

       V <- LETTERS[1:4]
       edL1 <- vector("list", length=4)
       names(edL1) <- V
       for(i in 1:4)
         edL1[[i]] <- list(edges=c(2,1,4,3)[i], weights=sqrt(i))
       gR <- new("graphNEL", nodes=V, edgeL=edL1)

       gX <- removeEdge("A", "B", gR)

