home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / scan < prev    next >
Encoding:
Text File  |  1997-04-23  |  1.5 KB  |  42 lines

  1.     
  2.     _R_e_a_d _D_a_t_a _V_a_l_u_e_s
  3.     
  4.          scan(file="", what=numeric(), nmax=0, sep="",
  5.                  skip=0, nlines=0)
  6.     
  7.     _A_r_g_u_m_e_n_t_s:
  8.     
  9.             file : the name of a file to read data values from.
  10.                    If the specified file is "", then input is
  11.                    taken from the keyboard (in this case input
  12.                    can be terminated by a blank line).
  13.     
  14.             what : the type of what gives the type of data to be
  15.                    read.  If what is a list it is assumed that
  16.                    the lines of the data file are records which
  17.                    each contain length(what) items.
  18.     
  19.             nmax : the maximum number of data values to be read,
  20.                    or if what is a list, the maximum number of
  21.                    records to be read.
  22.     
  23.              sep : by default, scan expects to read white-space
  24.                    delimited input fields.  Alternatively, sep
  25.                    can be used to specify a character which del-
  26.                    imits fields.
  27.     
  28.             skip : this many lines of the input file should be
  29.                    skipped before starting to read data values.
  30.     
  31.           nlines : the maximum number of lines of data to be
  32.                    read.
  33.     
  34.     _D_e_s_c_r_i_p_t_i_o_n:
  35.     
  36.          The value of what can be a list of types, in which case
  37.          scan returns a list of vectors with the types given by
  38.          the types of the elements in what.  This provides a way
  39.          of reading columnar data.  Keyboard entry is terminated
  40.          by typing a blank line.
  41.     
  42.