[R] File checking

Gabor Grothendieck ggrothendieck at gmail.com
Thu Mar 5 14:00:38 CET 2009


Try this:

file.info("empty.txt")$size == 0


On Thu, Mar 5, 2009 at 7:43 AM, ling ling <metal_licaling at live.com> wrote:
>
> Hello,
>
> How can I check if file is empty in R, if it is, then jump out and read next file; if it isn't, then read through?
>
> Thanks a lot for any help.
>
> Tammy
>
> _________________________________________________________________
> More than messages–check out the rest of the Windows Live™.
> http://www.microsoft.com/windows/windowslive/
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at 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.
>
>




More information about the R-help mailing list