[R] Help with Download of a comma separated file in zip format

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Tue Jul 15 19:31:49 CEST 2014

Circumventing content protection measures or picky server configurations such as this appears to be tends to involve HTTP protocol details that are off topic here, though someone may tackle your problem anyway and report back. Once you know what your protocol needs are (perhaps with the help of the Firebug Firefox developer tools) and have read the R documentation for the functions and packages you are using, asking for clarification on the documentation would be fair game here.

I tried setting the HTTPUserAgent string using the options function [1] but that didn't help.

Oh, and please read the Posting Guide mentioned at the bottom of all R-help posts, which points out that you should send plain text emails to this list. HTML is a what-you-see-is-not-necessarily-what-we-see format.

[1] https://stat.ethz.ch/pipermail/r-help/2007-November/145811.html
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

On July 15, 2014 8:24:01 AM PDT, Electron Musketeer <musketeere at gmail.com> wrote:
>Dear Experts
>I am new to this forum and to R and was trying the following to access
>zip file from  the webpages of the NSE. Here is my code.
>temp <- tempfile()
>con <- unz(temp, "a1.dat")
>data <- matrix(scan(con),ncol=4,byrow=TRUE)
>The result is:
>cannot open URL '
>In addition: Warning message:
>In download.file("
> :
>  cannot open: HTTP status was '403 Forbidden'
>I tried accessing this file directly from the website and it is letting
>access it. My question is why is it not letting me download from R? I
>gone through some websites to see if this has been resolved but the
>resolutions also do not work. Can someone help please?
>	[[alternative HTML version deleted]]
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list