root                   package:ape                   R Documentation

_R_o_o_t_s _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:

     This function reroots a phylogenetic tree with respect to the
     specified outgroup.

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

     root(phy, outgroup)

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

     phy: an object of class '"phylo"'.

outgroup: a vector of mode numeric or character specifying the new
          outgroup.

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

     The argument 'outgroup' can be either character or numeric. In the
     first case, it gives the labels of the tips of the new outgroup;
     in the second case the numbers of these labels in the vector
     'phy$tip.label' are given.

     If 'outgroup' is of length one (i.e. a single value), then the
     tree is rerooted using the node below this tip as the new root.

     If 'outgroup' is of length two or more, the most recent common
     ancestor (MRCA) is used as the new root. Note that the tree is
     really unrooted before being rerooted, so that if 'outgroup' is
     already the outgroup, then the returned tree is not the same than
     the original one (see examples). If 'outgroup' is not
     monophyletic, the operation fails and an error message is issued.

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

     an object of class '"phylo"'.

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

     Emmanuel Paradis paradis@isem.univ-montp2.fr

_S_e_e _A_l_s_o:

     'bind.tree', 'drop.tip', 'rotate'

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

     data(bird.orders)
     plot(root(bird.orders, 1))
     plot(root(bird.orders, 1:5))

