[R] Can R load a saved workspace from the Internet?

Paul Smith phhs80 at gmail.com
Wed Sep 24 00:17:19 CEST 2008


On Tue, Sep 23, 2008 at 11:06 PM, Peter Dalgaard
<p.dalgaard at biostat.ku.dk> wrote:
>> Can load() load a saved workspace from an Internet address? I have
>> tried it but I am getting errors:
>>
>> In addition: Warning message:
>> In readChar(con, 5L, useBytes = TRUE) :
>>  cannot open compressed file 'http://XXXXX/workspace.RData', probable
>> reason 'No such file or directory'
>
> Yes, but you need to open an url connection explicitly (I have forgotten why
> this is so).
>
> load(url("http://XXXXX/workspace.RData"))
>
> or even better, follow the last example in ?load.

Yes, Peter, that works. Thanks!

I do not know why with read.csv and read.table url() is not needed,
but with load() is. Should not the approach be similar in both cases?

Paul



More information about the R-help mailing list