[R] Problem with downloading workspace file from a web address

Paul Smith phhs80 at gmail.com
Sun Sep 27 20:37:24 CEST 2009


2009/9/27 Uwe Ligges <ligges at statistik.tu-dortmund.de>:
>> To load a previously saved workspace, one can do the following:
>>
>> load("/path/to/the/saved/workspace/file")
>>
>> However, if the path to the saved workspace file is a web address, one
>> gets the following error:
>>
>> «Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
>> In addition: Warning message:
>> In readChar(con, 5L, useBytes = TRUE) :
>>  cannot open compressed file
>> 'http://phhs80.googlepages.com/workspace20090922', probable reason 'No
>> such file or directory'»
>>
>> To circumvent this problem, one can download the saved workspace file
>> to a local folder with download.file() and the option
>>
>> mode="wb"
>>
>> active.
>>
>> My question is: Should not load() have the same mode option so that
>> everything could be done only with load() (and not with two
>> instructions: downaload.file() and load())?
>
>
> How did you try?
>
> Does load(url("http://phhs80.googlepages.com/workspace20090922")) work for
> you?

Thanks, Uwe, that works pretty fine!

Paul




More information about the R-help mailing list