Read Multiple Lines from Connection

DESCRIPTION:

Reads the specified lines of text input from the connection.

USAGE:

readLines(con, n, ok)

ARGUMENTS:

con
a connection. By default, stdin.
n
The number of lines to read. By default, -1, indicating to read to the end of the file.
ok
By default, T. If readLines reaches the end of the file before n lines are read, and ok is F, an error is generated.

VALUE:

The lines of input (with no new-line characters) as elements of a character vector.

DETAILS:

If output buffering is off, and con is set to stdin , in Windows, you will see a prompt at the beginning of each input line. If output buffering is on, you see no prompts.

SEE ALSO:

for reading a character string that is one line of input.

EXAMPLES:

readLines(n=3) 
# input three lines here.