An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111003/d1c9ce84/attachment.pl>
read .csv from web from password protected site
2 messages · Mike Pfeiff, Sarah Goslee
Hi Mike,
On Mon, Oct 3, 2011 at 12:31 PM, Mike Pfeiff <MikeP at kfoc.net> wrote:
I am very new to R and have been struggling trying to read a basic ".csv" file from a password protected site with the following code: myURL ?="http://www.frontierweather.com/degreedays/L15N15PowerRegionAverages_10weeks.txt" test2=read.table(url(myURL),header=TRUE,sep=",")
A 'data.frame' is returned into the workspace, however it is not the data contained in the ".csv" file. ? I think this occurs because the website where I am trying to retrieve the data is password protected. Is there a way to specify the username and password?
I'd try first
read.table("http://userid:password at my.url/file.csv"), which is the
standard way to do it (hint: try that form in your web browser and see
whether you can access the data), and if that doesn't work look into
the RCurl package. The list archives have a fair bit of information on
this topic.
Sarah
Any guidance would be greatly appreciated. Sincerely, Mike
Sarah Goslee http://www.functionaldiversity.org