Re: [Rd] readBin differences on Windows and Linux/mac

2008-01-01 Thread Sean Davis
On Jan 1, 2008 12:36 PM, Uwe Ligges <[EMAIL PROTECTED]> wrote: > Thank you, Henrik! This saves us a lot of time! > > Uwe > > > Henrik Bengtsson wrote: > > On 01/01/2008, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > >> Also make sure the problem is not due to downloading a gzip file in > >> text m

Re: [Rd] readBin differences on Windows and Linux/mac

2008-01-01 Thread Uwe Ligges
Thank you, Henrik! This saves us a lot of time! Uwe Henrik Bengtsson wrote: > On 01/01/2008, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: >> Also make sure the problem is not due to downloading a gzip file in >> text mode, because to the best of my understanding that is platform >> dependent. Th

Re: [Rd] readBin differences on Windows and Linux/mac

2008-01-01 Thread Henrik Bengtsson
On 01/01/2008, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > Also make sure the problem is not due to downloading a gzip file in > text mode, because to the best of my understanding that is platform > dependent. That is, use download.file(..., mode="wb") instead of the > default, which is mode="w"

Re: [Rd] readBin differences on Windows and Linux/mac

2008-01-01 Thread Henrik Bengtsson
Also make sure the problem is not due to downloading a gzip file in text mode, because to the best of my understanding that is platform dependent. That is, use download.file(..., mode="wb") instead of the default, which is mode="w". (This is such a common error that I would like to suggest mode="

Re: [Rd] readBin differences on Windows and Linux/mac

2008-01-01 Thread Uwe Ligges
I see. It is either a bug or something related to the following paragraph from ?seek: We have found so many errors in the Windows implementation of file positioning that users are advised to use it only at their own risk, and asked not to waste the R developers' time with bug

Re: [Rd] readBin differences on Windows and Linux/mac

2007-12-31 Thread Sean Davis
Sorry, Uwe. Of course: Both in relatively recent R-devel (one mac, one windows): ### gunzip pulled from R.utils to be a simple function ### In R.utils, implemented as a method gunzip <- function(filename, destname=gsub("[.]gz$", "", filename), overwrite=FALSE, remove=TRUE, BFR.SIZE=1e7) { if (

Re: [Rd] readBin differences on Windows and Linux/mac

2007-12-31 Thread Uwe Ligges
Can you give a reproducible example, pelase? Uwe Ligges Sean Davis wrote: > I have been trying to use the gunzip function in the R.utils package. It > opens a connection to a gzfile, uses readBin to read from that connection, > and then uses writeBin to write out the raw data to a new file. Th

[Rd] readBin differences on Windows and Linux/mac

2007-12-31 Thread Sean Davis
I have been trying to use the gunzip function in the R.utils package. It opens a connection to a gzfile, uses readBin to read from that connection, and then uses writeBin to write out the raw data to a new file. This works as expected under linux/mac, but under Windows, I get: Error in readBin(i