writeLines               package:base               R Documentation

_W_r_i_t_e _L_i_n_e_s _t_o _a _C_o_n_n_e_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Write text lines to a connection.

_U_s_a_g_e:

     writeLines(text, con = stdout(), sep = "\n")

_A_r_g_u_m_e_n_t_s:

    text: A character vector

     con: A connection object or a character string.

     sep: character. A string to be written to the connection after
          each line of text.

_D_e_t_a_i_l_s:

     If the 'con' is a character string, the function calls 'file' to
     obtain a file connection which is opened for the duration of the
     function call.

     If the connection is open it is written from its current position.
     If it is not open, it is opened for the duration of the call and
     then closed again.

     Normally 'writeLines' is used with a text connection, and the
     default separator is converted to the normal separator for that
     platform (LF on Unix/Linux, CRLF on Windows, CR on Classic MacOS).
      For more control, open a binary connection and specify the
     precise value you want written to the file in 'sep'.  For even
     more control, use 'writeChar' on a binary connection.

_S_e_e _A_l_s_o:

     'connections', 'writeChar', 'writeBin', 'readLines', 'cat'

