writeLines {base} | R Documentation |
Write text lines to a connection.
writeLines(text, con = stdout(), sep = "\n")
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. |
If the con
is a character string, the functions call
file
to obtain an 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.