prepdata              package:hierfstat              R Documentation

_S_o_r_t _a_n_d _r_e_n_u_m_b_e_r _a_n_d _r_e_c_o_d_e _l_e_v_e_l_s _f_o_r _t_h_e _h_i_e_r_a_r_c_h_i_c_a_l _a_n_a_l_y_s_i_s _i_f _n_e_c_e_s_s_a_r_y

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

     Called by varcomp to rearrange data. Should not need to be called
     directly

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

     prepdata(data)

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

    data: takes as input the different factor from the outermost (e.g.
          region) to the innermost (e.g. individual). This function
          must be applied before transformation of genotypic to allelic
          data

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

     a reoredered,renumbered and sorted data frame

_R_e_f_e_r_e_n_c_e_s:

     Goudet J. (2005). Hierfstat, a package for R to compute and test
     variance components and F-statistics. Molecular Ecology Notes.
     5:184-186

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

     'varcomp'.

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

     f1<-rep(c("B","C","A"),each=10)
     f2<-rep(c("d","i","f","g","h","e"),each=5)
     prepdata(data.frame(loc=f1,patch=f2,ind=1:30))

