With the text of your message copied to the clipboard:
> con <- file("clipboard", "r")
> readLines(con, 1)
[1] "I am looking for a function to test for end-of-file on a connection."
> readLines(con, 1)
[1] "Apparently this question was already asked a couple of years ago and"
> readLines(con, 1)
[
Hi,
I am looking for a function to test for end-of-file on a connection.
Apparently this question was already asked a couple of years ago and
then P. Dalgaard suggested to look at help(connections),
help(readLines). Unfortunately, I couldn't find such a function on those
pages, maybe I am missing