[R] File Downloading Problem

Alex Gutteridge alexg at ruggedtextile.com
Mon Nov 1 18:02:02 CET 2010

On Mon, 1 Nov 2010 20:57:47 +0530, "Santosh Srinivas"
<santosh.srinivas at gmail.com> wrote:
> It's strange and the internet connection is fine because I am able to
> data from yahoo.
> This was working till just yesterday ... strange if the website is
> issues with public access of basic data!

It's checking your HTTP UserAgent header. Spoof it for access:

> options(HTTPUserAgent = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6;
en-US; rv: Gecko/20101026 Firefox/3.6.12")
> sURL =
> download.file(sURL,"test")
trying URL
Content type 'application/zip' length 43124 bytes (42 Kb)
opened URL
downloaded 42 Kb

Alex Gutteridge

More information about the R-help mailing list