eof {sealevel} | R Documentation |
Check for the end of file.
eof(con)
con |
A connection |
This function tries to read a file, if there's more data then it rewinds and returns true. If the file is not seekable the end of file check is not performed, because we wouldn't be able to rewind.
A logical, TRUE if end of file is reached.
Checking for end of files explicitly is rarely necessary.
Fedor Baart
I probably copied this code from somewhere but I can't find the source anymore.
f <- file() eof(f)