Rev 42333 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/base/man/writeLines.Rd% Part of the R package, http://www.R-project.org% Copyright 1995-2007 R Core Development Team% Distributed under GPL 2 or later\name{writeLines}\alias{writeLines}\title{Write Lines to a Connection}\description{Write text lines to a connection.}\usage{writeLines(text, con = stdout(), sep = "\n")}\arguments{\item{text}{A character vector}\item{con}{A connection object or a character string.}\item{sep}{character. A string to be written to the connection aftereach line of text.}}\details{If the \code{con} is a character string, the function calls\code{\link{file}} to obtain a file connection which is opened forthe 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 thenclosed again.Normally \code{writeLines} is used with a text connection, and thedefault separator is converted to the normal separator for thatplatform (LF on Unix/Linux, CRLF on Windows, CR on Classic MacOS). Formore control, open a binary connection and specify the precise valueyou want written to the file in \code{sep}. For even more control,use \code{\link{writeChar}} on a binary connection.}\seealso{\code{\link{connections}}, \code{\link{writeChar}}, \code{\link{writeBin}},\code{\link{readLines}}, \code{\link{cat}}}\keyword{file}\keyword{connection}