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 in
     '"wt"' mode and then closed again.

     Normally 'writeLines' is used with a text-mode  connection, and
     the default separator is converted to the normal separator for
     that platform (LF on Unix/Linux, CRLF on Windows).  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'

