Re: [R] checking whether a file is empty

2008-04-30 Thread Dirk Eddelbuettel
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/fahe

Re: [R] checking whether a file is empty

2008-04-30 Thread Henrik Bengtsson
help(file.info). /Henrik On Wed, Apr 30, 2008 at 5:33 PM, Faheem Mitha <[EMAIL PROTECTED]> wrote: > > Hi, > > 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. >

Re: [R] checking whether a file is empty

2008-04-30 Thread Jorge Ivan Velez
Hi Faheem, Also, you could try in www.rseek.org and RSiteSearch("your.topic.here"). HTH, Jorge On Wed, Apr 30, 2008 at 11:53 AM, Faheem Mitha <[EMAIL PROTECTED]> wrote: > > > On Wed, 30 Apr 2008, Prof Brian Ripley wrote: > > What is wrong with > > > > file.create("foo") > > > > > [1] TRUE >

Re: [R] checking whether a file is empty

2008-04-30 Thread Faheem Mitha
On Wed, 30 Apr 2008, Prof Brian Ripley wrote: What is wrong with file.create("foo") [1] TRUE file.info("foo")$size [1] 0 file.remove("foo") ? Thanks, that works for me. I really wonder what searches you did: help.search("file") come up with file.info. I did a Google search for "R

Re: [R] checking whether a file is empty

2008-04-30 Thread Prof Brian Ripley
What is wrong with file.create("foo") [1] TRUE file.info("foo")$size [1] 0 file.remove("foo") ? I really wonder what searches you did: help.search("file") come up with file.info. On Wed, 30 Apr 2008, Faheem Mitha wrote: Is there a way to check whether a file is empty in R. I did the

[R] checking whether a file is empty

2008-04-30 Thread Faheem Mitha
Hi, 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. Thanks, Faheem. __ R-help@r-project.org mailing