charToInt                package:R.oo                R Documentation

_C_o_n_v_e_r_t_s _a _v_e_c_t_o_r _o_f _i_n_t_e_g_e_r_s _i_n_t_o _a _v_e_c_t_o_r _o_f _A_S_C_I_I _c_h_a_r_a_c_t_e_r_s

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

     Converts a 'vector' of ASCII 'character's to a equal length vector
     of ASCII 'integer's.

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

     ## Default S3 method:
     charToInt(ch, ...)

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

      ch: A 'character' 'vector'.

     ...: Not used.

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

     Returns an ASCII 'character' 'vector'.

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

     Henrik Bengtsson (<URL: http://www.braju.com/R/>)

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

     'intToChar'()

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

       i <- charToInt(unlist(strsplit("Hello world!", split=NULL)))
       # Gives: 72 101 108 108 111  32 119 111 114 108 100  33
       ch <- intToChar(c(72,101,108,108,111,32,119,111,114,108,100,33))
       # Gives: "H" "e" "l" "l" "o" " " "w" "o" "r" "l" "d" "!"

