depthStruct            package:ontoTools            R Documentation

_t_o_o_l_s _f_o_r _m_a_n_i_p_u_l_a_t_i_n_g _d_e_p_t_h _c_o_n_c_e_p_t_s _f_o_r _r_o_o_t_e_d _D_A_G_s

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

     return a list of environments giving mapping from node name to
     rooted DAG depth and from depth to vector of names of nodes at
     that depth

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

     depthStruct(rg)
     ontoDepth(rg)
     DMdepth(g, maxd)

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

      rg: rg: instance of class rootedDAG

       g: rg: instance of class depth

    maxd: maxd: bound on depth to be measured

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

     depthStruct: a list of two environments (see examples).

_N_o_t_e:

     ontoDepth is the workhorse for depthStruct. DMdepth is a function
     that works on a plain graph, creating the 'daughter matrix' and
     computing depths.

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

     Vince Carey <stvjc@channing.harvard.edu>

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

     data(litOnto)
     print(litOnto)
     g1 <- new("rootedDAG", DAG=litOnto, root="A")
     o1 <- new("ontology", name="demo", version="0.1",
             rDAG=g1)
     print(ds <- depthStruct(g1))
     ds$tag2depth("A")
     ds$tag2depth("H")
     ds$depth2tag(2)

