[R] Comment on loadURL: should default to mode="wb"

Seth Falcon sfalcon at fhcrc.org
Sat Feb 19 19:11:20 CET 2005


On Feb 18, 2005, at 10:56 PM, Prof Brian Ripley wrote:
> A bit more explanation.
>
> On Sat, 19 Feb 2005, Prof Brian Ripley wrote:
>
>> Why are you using an out-dated interface anyway?  See the examples 
>> for loadURL!

Yep, the example section told me how to do the right thing and I missed 
it.

The funny thing is that I was thinking to myself, "hey, I bet I can use 
a connection with url() instead of calling download.file" --- I went to 
check the help for load() to make sure connections were ok and got led 
astray by loadURL which in my mind was exactly what I wanted to do.

I maintain that since the default of save() is ascii=FALSE, that 
loadURL should either do the right thing on Windows or perhaps have a 
deprecation note in the help file to help guide users towards the 
modern interface.

> The modern interface does work on Windows:
>
>> load(url("http://www.stats.ox.ac.uk/pub/bdr/hills.rda"))
>
> no error (and I have removed the file).

Excellent.  I will use the modern interface.

Best,

+ seth




More information about the R-help mailing list