Skip to content
Back to formatted view

Raw Message

Message-ID: <BBAF7663-A961-4225-BC41-14C39C14797D@comcast.net>
Date: 2013-07-23T16:07:47Z
From: David Winsemius
Subject: downloading web content
In-Reply-To: <CAFf2dDEiEJ_cD=JD4P=DX0=L=dxxC3N8GVz1GjA187H-Ad8yUg@mail.gmail.com>

On Jul 23, 2013, at 2:59 AM, Daisy Englert Duursma wrote:

> Hello,
> I am trying to use R to download a bunch of .csv  files such as:

It's are not a csv file; instead it's a zip file. Why not use the `download.file` function. This downloads it to my working directory:

> download.file("http://biocache.ala.org.au/ws/occurrences/download?q=Banksia+ericifolia", "data.zip")
trying URL 'http://biocache.ala.org.au/ws/occurrences/download?q=Banksia+ericifolia'
Content type 'application/zip' length unknown
opened URL
.......... .......... .......... .......... ..........
.......... .......... .......... .......... ..........
.......... .......... .......... .......... ..........
.......... .......... .......... .......... ..........
....
downloaded 204 Kb

-- 
David.


> 
> http://biocache.ala.org.au/ws/occurrences/download?q=Banksia+ericifolia
> 
> I have tried the following and neither work:
> 
> a<- getURL("
> http://biocache.ala.org.au/ws/occurrences/download?q=Banksia+ericifolia")
> 
> Error in curlPerform(curl = curl, .opts = opts, .encoding = .encoding) :
>  embedded nul in string:
> and
> 
> a<-httpPOST("
> http://biocache.ala.org.au/ws/occurrences/download?q=Banksia+ericifolia")
> 
> Error: Internal Server Error
> 
> 
> Any help would be appreciated.
> 
> Daisy
> -- 
> Daisy Englert Duursma
> Department of Biological Sciences
> Room E8C156
> Macquarie University, North Ryde, NSW 2109
> Australia
> 
> 	[[alternative HTML version deleted]]

And do learn to post in plain-text.

-- 

David Winsemius
Alameda, CA, USA