scanFN               package:bayesSurv               R Documentation

_R_e_a_d _D_a_t_a _V_a_l_u_e_s

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

     Read numeric data into a data frame from a file. Header is assumed
     to be present in the file.

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

     scanFN(file, quiet=FALSE)

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

    file: the name of a file to read data values from.  If the
          specified file is '""', then input is taken from the keyboard
          (or 'stdin' if input is redirected). (In this case input can
          be terminated by a blank line or an EOF signal, 'Ctrl-D' on
          Unix and 'Ctrl-Z' on Windows.)

          Otherwise, the file name is interpreted _relative_ to the
          current working directory (given by 'getwd()'), unless it
          specifies an _absolute_ path. Tilde-expansion is performed
          where supported.

          Alternatively, 'file' can be a 'connection', which will be
          opened if necessary, and if so closed at the end of the
          function call.  Whatever mode the connection is opened in,
          any of LF, CRLF or CR will be accepted as the EOL marker for
          a line and so will match 'sep = "\n"'.

          'file' can also be a complete URL.

          To read a data file not in the current encoding (for example
          a Latin-1 file in a UTF-8 locale or conversely) use a 'file'
          connection setting the 'encoding' argument. 

   quiet: logical: if 'FALSE' (default), scan() will print a line,
          saying how many items have been read.

_D_e_t_a_i_l_s:

     See 'scan'.

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

     'data.frame' with read data values.

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

     Arno&#353t Kom&#225rek komarek@karlin.mff.cuni.cz

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

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

     'scan'

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

     cat("x y z", "1 2 3", "1 4 6", "10 20 30", file="ex.data", sep="\n")
     pp <- scanFN("ex.data", quiet=FALSE)
     pp <- scanFN("ex.data", quiet= TRUE)
     print(pp)
     unlink("ex.data") # tidy up

