randomSubGraph           package:KEGGgraph           R Documentation

_R_a_n_d_o_m_l_y _s_u_b_s_e_t _t_h_e _g_i_v_e_n _g_r_a_p_h

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

     The function is intended to be a test tool. It subset the given
     graph repeatedly.

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

     randomSubGraph(graph, per = 0.25, N = 10)

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

   graph: A graph object 

     per: numeric, the percentage of the nodes to be sampled, value
          between (0,1) 

       N: Repeat times

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

     The function is called for its side effect, 'NULL' is returned

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

     Jitao David Zhang <URL: mailto:j.zhang@dkfz.de>

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

     tnodes <- c("Hamburg","Dortmund","Bremen", "Paris")
     tedges <- list("Hamburg"=c("Dortmund", "Bremen"),
     "Dortmund"=c("Hamburg"), "Bremen"=c("Hamburg"), "Paris"=c())
     tgraph <- new("graphNEL", nodes = tnodes, edgeL = tedges)
     randomSubGraph(tgraph, 0.5, 10)

