tree.plot                package:ouch                R Documentation

_V_a_l_i_d_a_t_i_n_g _a_n_d _p_l_o_t_t_i_n_g _p_h_y_l_o_g_e_n_e_t_i_c _t_r_e_e_s.

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

     Validate or plot the phylogenetic tree in ouch format.

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

     is.valid.ouch.tree(node, ancestor, times, regimes = NULL)
     tree.plot(node, ancestor, times, names = NULL, regimes = NULL)

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

    node: A character vector giving the name of each node.

ancestor: Specification of the topology of the phylogenetic tree.  This
          is in the form of a character vector naming the immediate
          ancestor of each node.  In particular, the i-th name is that
          of the ancestor of the i-th node.  The root node is
          distinguished by having no ancestor (i.e., NA).

   times: A vector of nonnegative numbers, one per node in the tree,
          specifying the time at which each node is located.  The root
          node should be assigned time 0.

   names: Optional vector of species names.

 regimes: A vector of codes, one for each node in the tree, specifying
          the selective regimes hypothesized to have been operative. 
          Corresponding to each node, enter the code of the regime
          hypothesized for the branch segment terminating in that node.
          For the root node, because it has no branch segment
          terminating on it, the regime specification is irrelevant.

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

     'tree.plot' makes a simple plot of the phylogenetic tree.  Labels
     and/or a selective-regime-based coloring scheme are optional.

     'is.valid.ouch.tree' performs several checks to make sure that the
     tree is valid.  These include checks to ensure that all the vector
     arguments are of the same length, that the nodes have unique
     names, that there is a unique root, that there is at least one
     terminal node, that every node's ancestor is in fact part of the
     tree, that there are no cycles in the 'tree', and that the tree is
     connected.  It returns TRUE if the tree is valid, FALSE otherwise
     and gives diagnostic warnings.

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

     Aaron A. King <king at tiem dot utk dot edu>

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

     data(bimac)
     attach(bimac)
     is.valid.ouch.tree(node,ancestor,time,OU.LP)
     tree.plot(node,ancestor,time,species,OU.LP)

