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
seek() - What is the largest integer that can be used?
2 messages · Steven Hansen, Brian Ripley
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
commented, minimal, self-contained, reproducible code
(Nor have you told us your R version.)
On Fri, 22 Dec 2006, Steven Hansen wrote:
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.
That will not work unless your OS supports seek on files > 2GB, in which case direct seek should work.
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
______________________________________________ R-help at stat.math.ethz.ch 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.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595