Read a Line from the Terminal

DESCRIPTION:
Returns a character string which is one line of input.

USAGE:
readline()

VALUE:
character string giving the line read from the terminal. This contains all of the characters typed prior to an <enter> or <return>.

DETAILS:
This is useful in writing S-PLUS functions that interact with the user.

EXAMPLES:
cat("Do you want to continue? ")
ans <- readline()
if(ans=="n" || ans=="no") return()

reply <- readline() if (nchar(reply) == 0) break else reply <- as.numeric(reply)