nchar                  package:base                  R Documentation

_C_o_u_n_t _t_h_e _N_u_m_b_e_r _o_f _C_h_a_r_a_c_t_e_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     `nchar' takes a character vector as an argument and returns a
     vector whose elements contain the number of characters in the
     corresponding element of `x'. It only accepts character vectors as
     arguments if you want to operate on other objects passing them
     through `deparse' first will be required.

_U_s_a_g_e:

     nchar(x)

_S_e_e _A_l_s_o:

     `strwidth' giving width of strings for plotting; `paste',
     `substr', `strsplit'

_E_x_a_m_p_l_e_s:

     x<-c("asfef","qwerty","yuiop[","b","stuff.blah.yech")
     nchar(x)
     # 5  6  6  1 15

     nchar(deparse(mean))
     # 23  1 16 45 11 64  2 17 50 43  2 17  1

