intToChar                package:R.oo                R Documentation

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

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

     Converts a vector of ASCII integers to a equal length vector of
     ASCII characters. To make sure that all values in the input vector
     are in the range [0,255], the input vector is taken modulo 256.

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

     ## Default S3 method:
     intToChar(i, ...)

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

       i: An 'integer' 'vector'.

     ...: Not used.

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

     Returns a ASCII 'integer' 'vector'.

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

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

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

     'charToInt'()

_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" "!"

