numeric.string           package:cwhstring           R Documentation

_T_e_s_t _s_t_r_i_n_g _f_o_r _b_e_i_n_g _a _n_u_m_b_e_r _o_r _m_a_d_e _u_p _o_f _d_i_g_i_t_s _o_n_l_y.

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

     'numeric.string' Test whether the elements of a character vector
     represent legal numbers only. 'all.digits' Test whether the
     elements of a character vector consist of digits only

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

     numeric.string(str)
     all.digits(str)

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

     str: A character vector.

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

     TRUE, FALSE

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

     Christian W. Hoffmann, christian.hoffmann@wsl.ch, <URL:
     http://www.wsl.ch/staff/christian.hoffmann>

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

     all.digits(c("1231","89a8742")) #  TRUE FALSE
     numeric.string(c("1231","8.9e-2",".7d2")) # [1]  TRUE  TRUE FALSE

