numericCHR            package:quantsmooth            R Documentation

_C_o_n_v_e_r_s_i_o_n _o_f _c_h_r_o_m_o_s_o_m_e _I_D_s _b_e_t_w_e_e_n _n_u_m_e_r_i_c _a_n_d _c_h_a_r_a_c_t_e_r

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

     The function converts chromosomal ids to their numeric form, and
     the sex  chromosomes to values between 98 and 100. This simplifies
     sorting on chromosome ID

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

     numericCHR(CHR)
     characterCHR(CHR)

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

     CHR: character/numeric vector for both functions the mode of the
          input  is not forced. For numericCHR strings "X","Y" and "XY"
          are converted  to 98,99 and 100 respectively.  

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

     'numericCHR' returns a numeric vector of same length as 'CHR'
     'characterCHR' returns a character vector of same length as 'CHR'

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

     Jan Oosting

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

        chroms<-c("3","2","8","X","7","Y","5","1","9","10","11","12","4","6")
        sort(chroms)
        sort(numericCHR(chroms))
        characterCHR(sort(numericCHR(chroms)))

