From rpeng at jhsph.edu  Tue Aug 31 16:11:51 2004
From: rpeng at jhsph.edu (Roger D. Peng)
Date: Tue Aug 31 16:11:59 2004
Subject: [Rd] file.info() on file larger than 2GB
Message-ID: <41348727.8050009@jhsph.edu>

I've got a file that's approximately 2.2GB and it seems to be foiling 
file.info().  When I run `stat' from the shell I get

zooey:> stat data.csv
   File: `data.csv'
   Size: 2271197563      Blocks: 4440280    IO Block: 4096   regular file
Device: 342h/834d       Inode: 9994308     Links: 1
Access: (0644/-rw-r--r--)  Uid: (  500/   rpeng)   Gid: (  500/   rpeng)
Access: 2004-08-31 09:50:04.000000000 -0400
Modify: 2004-08-26 19:09:42.000000000 -0400
Change: 2004-08-31 09:53:29.000000000 -0400

But, file.info() in R-devel gives me:

 > file.info("data.csv")
          size isdir mode mtime ctime atime uid gid uname grname
data.csv   NA    NA <NA>  <NA>  <NA>  <NA>  NA  NA  <NA>   <NA>

I assume this has something to do with the underlying call to `stat' 
in `do_fileinfo'.

This alone is not much of a problem but I also can't seem to be able 
to open a file connection to the same file.  For example,

 > con <- file("data.csv")
 > open(con, "r")
Error in open.connection(con, "r") : unable to open connection
In addition: Warning message:
cannot open file `data.csv'

Also, interestingly,

 > file.exists("data.csv")
[1] FALSE

I take it all these things are related.

Is it possible to fix this within R?  Or should there be a note in the 
help pages?

 > version
          _
platform i686-pc-linux-gnu
arch     i686
os       linux-gnu
system   i686, linux-gnu
status   Under development (unstable)
major    2
minor    0.0
year     2004
month    08
day      31
language R

-roger


[Rd] file.info() on file larger than 2GB
Roger D. Peng