removeNode               package:graph               R Documentation

_r_e_m_o_v_e_N_o_d_e

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

     A function to remove a node from a graph. All edges to and from
     the node are also removed.

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

     removeNode(node, object)

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

    node: The label of the node to be removed. 

  object: The graph to remove the node from. 

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

     The specified node is removed from the graph as are all edges to
     and from that node. A new instance of the same class as 'object'
     with the specified node(s) is returned.

     Note, node can be a vector of labels, in which case all nodes are
     removed.

     This is similar to 'subGraph'.

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

     A new instance of a graph of the same class as 'object' but with
     all specified nodes removed.

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

     R. Gentleman

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

     'removeEdge', 'addEdge', 'addNode','subGraph'

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

       V <- LETTERS[1:4]
       edL2 <- vector("list", length=4)
       names(edL2) <- V
       for(i in 1:4)
         edL2[[i]] <- list(edges=c(2,1,2,1)[i], weights=sqrt(i))
       gR2 <- new("graphNEL", nodes=V, edgeL=edL2)
       gX <- removeNode("C", gR2)

