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)

