Re: [R] Problem with scan() from UTF-8 encoded URL

From: EUROPOL <hkiws_at_gmx.de>
Date: Mon, 03 Dec 2007 19:15:17 +0100

    ,

Thank you for trying. Strange.

I am using R version 2.6.0 Patched (2007-11-09 r43408) on OSX and it is not working. I guess it has something to do with the language settings.

However.

Regards

Marc Schwenzer

john seers (IFR) wrote:
>
>
> Hello
>
> Works fine for me:
>
>
>> data
>>
> <-scan(file='http://en.wikipedia.org/wiki/Special:Recentchanges',what='c
> haracter')
> Read 3581 items
>
>
> So I don't think it is the Wikipedia end.
>
> Regards
>
> John Seers
>
>
>
> ---
>
> -----Original Message-----
> From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org]
> On Behalf Of EUROPOL
> Sent: 03 December 2007 16:51
> To: r-help_at_stat.math.ethz.ch
> Subject: [R] Problem with scan() from UTF-8 encoded URL
>
> Hallo,
>
> I am trying to import a website and structure it from within R:
>
> The following code:
>
> data <-
> scan(file='http://en.wikipedia.org/wiki/Special:Recentchanges',what='cha
> racter')
>
> results in the error:
>
> Error in file(file, "r") : unable to open connection In addition:
> Warning message:
> cannot open: HTTP status was '403 Forbidden' in: file(file, "r")
>
> It seems that the error is connected to the UTF-8-format of wikipedia,
> since the following line works:
>
> data <- scan(file='http://www.google.de',what='character')
>
> I am looking forward to your answers.
>
> Greetings
>
> Marc Schwenzer
>
> ______________________________________________
> 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.
>
>



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. Received on Mon 03 Dec 2007 - 18:23:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 03 Dec 2007 - 18:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.