[R] Accessing data via url

Uwe Ligges ligges at statistik.tu-dortmund.de
Sat Jan 8 19:53:39 CET 2011



On 07.01.2011 19:18, John Kane wrote:
>
>
> --- On Fri, 1/7/11, Prof Brian Ripley<ripley at stats.ox.ac.uk>  wrote:
>
>> From: Prof Brian Ripley<ripley at stats.ox.ac.uk>
>> Subject: Re: [R] Accessing data via url
>
>> ?read.table says
>>
>>             ‘file’
>> can also be a complete URL.
>>
>> This is implemented by url(): see the section on URLs on
>> its help
> Thanks
>
>
>> page.  You haven't followed the posting guide and told
>> us your OS, and>  what the section says does depend on the OS.
>
> Sorry I thought I had it in my sig file .  Added now.
> R 2.12.0&  Windows 7
>>
>> On Thu, 6 Jan 2011, John Kane wrote:
>>
>>> #   Can anyone suggest why this works
>>>
>>> datafilename<- "http://personality-project.org/r/datasets/maps.mixx.epi.bfi.data"
>>> person.data<-
>> read.table(datafilename,header=TRUE)
>>>
>>> # but this does not?
>>>
>>> dd<- "https://sites.google.com/site/jrkrideau/home/general-stores/trees.txt"
>>> treedata<- read.table(dd, header=TRUE)

Have you ever tried to open the latter URL in a browser? It fails for me.

Uwe Ligges


>>>
>>>
>> ===================================================================
>>>
>>> Error in file(file, "rt") : cannot open the
>> connection
>>> In addition: Warning message:
>>> In file(file, "rt") : unsupported URL scheme
>>>
>>> # I can access both through a hyperlink in OOO Calc.
>> t
>>> #  Thanks
>>
>> --
>> Brian D. Ripley,
>>        ripley at stats.ox.ac.uk
>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>> University of Oxford,
>>     Tel:  +44 1865 272861 (self)
>> 1 South Parks Road,
>>             +44 1865
>> 272866 (PA)
>> Oxford OX1 3TG, UK
>>      Fax:  +44 1865 272595
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list