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]]
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. > >
?file.info 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. > >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?