Skip to content
Prev 205110 / 398506 Next

How to not to terminate read.table if the input file is empty?

On Fri, Jan 1, 2010 at 2:54 PM, Dylan Beaudette
<dylan.beaudette at gmail.com> wrote:
This works. Thank you!
Error in read.table("empty_data.txt") : no lines available in input
+   f=NULL
+ }
NULL
V1     V2     V3     V4
1 name title1 title2 title3
2 row1   10.1   20.1   30.1
3 row2   12.1   22.1   32.1