Skip to content

seek() - What is the largest integer that can be used?

2 messages · Steven Hansen, Brian Ripley

#
I am attempting to use seek() to navigate through a large binary file (3GB).  I would like to move to a file position which would require my "where" value to be greater than 2*10^9.  This doesn't appear to be working, however.  Is there any way around this problem on a 32-bit OS?  If not I plan to modify my code to move through the binary file in smaller steps.  I was curious as to whether there was another solution.
Thank you for your help.
-Steve

Steve Hansen
Transportation Planner
Metro
600 NE Grand Ave
Portland, OR 97232
(503)797-1894
hansens at metro.dst.or.us
#
This is discussed in the R-admin manual.  You cannot use integers, and 
'where' is documented as numeric, not integer.  You may have to set 
options at configure time, depending on your OS (although recent versions 
of R are good at figuring these out).

On decent 32-bit OSes this does work.  You haven't studied the posting 
guide and hence failed to tell us what yours is, nor have you provided
(Nor have you told us your R version.)
On Fri, 22 Dec 2006, Steven Hansen wrote:

            
That will not work unless your OS supports seek on files > 2GB, in which 
case direct seek should work.