[R] seek(), Windows and Cygwin (was "a UNIX vs. Windows package question, please")

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Tue Jan 13 21:20:01 CET 2015

I don't know why the R developers made that comment, and R-devel is probably a better place to follow up, but the usual problem is that Windows treats text files differently than binary files, so seeking n text files is a headache. Binary files ought to be okay, but that is a theoretical opinion, not from experience.
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

On January 13, 2015 10:51:18 AM PST, Mike Miller <mbmiller at umn.edu> wrote:
>On Fri, 9 Jan 2015, Duncan Murdoch wrote:
>> On 09/01/2015 5:32 PM, Erin Hodgess wrote:
>>> Hello again.
>>> Here is another question that I am puzzled about:  I had the 
>>> (incorrect) impression that if I had Rtools on a Windows machine
>that I 
>>> could use any tar.gz package.  However, that is not true.
>>> In particular, I was looking at the rPython package.  I do indeed
>>> Python on this machine. But when I did R CMD INSTALL rPython, I got
>>> error message that said, "this is a Unix package".  Interesting.
>>> Should I just stay with my Ubuntu laptop and behave?
>> No, but you should not use packages that misbehave.  The ideal R
>> will run on all platforms where R runs.  Some require effort from the
>> user to provide prerequisites, but no good R package runs only on one
>> platform.
>That reminds me to ask if anyone here can provide more details about
>limitations of seek().  I'm working on some functions that use seek()
>I may have to tell Windows users not to use these functions.
>>From the manual page for seek():
>"Use of seek on Windows is discouraged. We have found so many errors in
>the Windows implementation of file positioning that users are advised
>use it only at their own risk, and asked not to waste the R developers'
>time with bug reports on Windows' deficiencies."
>My question is about whether this limitation is caused by the Windows 
>filesystem, typically NTFS, or if the problem is in the Windows OS.  If
>the problem were in the filesystem, maybe the docs would have said so 
>because NTFS can be used on other platforms.
>Secondly, can this problem be addressed at all by using Cygwin?  I know
>that Cygwin is running in Windows, so it's still Windows, but R might
>compiled differently, so I just thought I'd ask!  ;-)
>And it doesn't matter which Windows version is used?
>Finally, if the problem is entirely in Windows, and R cannot possibly 
>overcome it, I suppose that means that it is impossible to write a
>to run under Windows that can seek (is it fseek in C?) reliably to a 
>position in a file.  If that is the case, it's going to be hard to
>good systems for managing bioinformatic data on Windows.
>Thanks in advance.

More information about the R-help mailing list