rtree                  package:ape                  R Documentation

_G_e_n_e_r_a_t_e_s _R_a_n_d_o_m _T_r_e_e_s

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

     This function generates a tree by splitting randomly the edges
     until the specified number of tips is obtained.

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

     rtree(n, br = TRUE)

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

       n: an integer giving the number of tips in the tree.

      br: a logical specifying whether the tree should have branch
          lengths (default is 'TRUE').

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

     If 'br = TRUE', branch lengths are taken from a uniform
     distribution on [0, 1].

     This is an experimental function and is not intended to generate
     trees with given statistical characteristics (at least for the
     moment). Its present purpose is to give a tree of a specified size
     in an easy way. To get an ultrametric tree, one may apply the
     function 'chronogram' to the tree generated by 'rtree'.

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

     Emmanuel Paradis paradis@isem.univ-montp2.fr

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

     layout(matrix(1:9, 3, 3))
     ### Nine random trees:
     for (i in 1:9) plot(rtree(20))
     ### Nine random cladograms:
     for (i in 1:9) plot(rtree(20, FALSE), type = "c")
     layout(matrix(1))

