average_cols_aap           package:bgafun           R Documentation

_R_e_p_l_a_c_e_s _g_a_p_s _w_i_t_h _t_h_e _a_v_e_r_a_g_e _o_f _t_h_e _c_o_l_u_m_n

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

     This function will deal with gaps in the Amino Acid Property
     encoding scheme It replaces gaps with the average in the column
     for each group, provided the column is highly occupied for that
     group.  It will only average out over columns that have high
     percentage of gaps It will remove all other columns containing
     gaps.

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

      average_cols_aap(x,y)

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

       x: Matrix representation of alignment generated by
          convert_aln_AAP 

       y: Vector or factor that shows the group representation for each
          sequence in the alignment

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

     library(bgafun)
     data(LDH)
     data(LDH.groups)
     LDH.aap=convert_aln_AAP(LDH)
     LDH.aap.ave=average_cols_aap(LDH.aap,LDH.groups)
     dim(LDH.aap.ave)

