scanText              package:CGIwithR              R Documentation

_S_c_a_n _a _C_h_a_r_a_c_t_e_r _S_t_r_i_n_g

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

     Useful for converting data entered via a HTML textarea, for
     example,  into a list or vector for further processing.

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

     scanText(string, what = character(0), ...)

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

  string: A character string, typically numbers or words  separated by
          white space

    what: As for 'scan'.  The type of 'what' gives the  type of data to
          be read.  If 'what' is a list, it is assumed that the lines
          of the data file are records each containing 'length(what)'
          items (``fields'').  The supported types are 'logical',
          'integer', 'numeric', 'complex', 'character' and  'list':
          'list' values should have elements which are one of the first
          five types listed or 'NULL'.

     ...: Other arguments to be passed to 'scan'

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

     David Firth d.firth@warwick.ac.uk

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

     scanText("A few short words")
     as.numeric(scanText("1 2 3\n89 90"))
     scanText("A B C \n 4 5 6", what = list("A", "A", "A", 0, 0, 0))

