On Wed, Apr 30, 2008 at 11:33:01AM -0400, Faheem Mitha wrote: > Is there a way to check whether a file is empty in R. I did the customary > searches, but did not find anything. Please cc me on any reply.
Empty file have, by definition, a size of zero, so here's one way: > system("touch /tmp/faheem") > file.info("/tmp/faheem")$size == 0 [1] TRUE Hth, Dirk -- Three out of two people have difficulties with fractions. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.