[R-SIG-Finance] Website authentication with R

Dirk Eddelbuettel edd at debian.org
Tue Sep 4 02:51:31 CEST 2007

On 4 September 2007 at 08:20, Ian Seow wrote:
| Hi guys, I'm currently running daily batch jobs to pull various data
| from the web (using R CMD BATCH, in conjunction with cron jobs) and
| then parsing them with R functions for stat analysis. However, I
| recently encountered problems doing so on websites requiring
| authentication. In Perl this would be done something like:
| $ua->credentials( $netloc, $realm, $uname, $pass )..... Is there an
| equivalent for this in R? I see that there is a HTTPUserAgent setting
| in options( ), but unfortunately there's no username/password field.
| Has anyone else encountered similar problems?

While this is not really an r-sig-finance question, I can think of 

i)   Switch to using wget as your download agent; you can the 'drive' all
     authentication from wget and test it indepently.  See ?download.file 
     and esp. ?download.file.method

ii)  Try the RCurl package which provides all the goodness.

iii) If you can't get it done with R, use a first batch job to download
     with Perl and use R for subsequent analysis.

Hth, Dirk

Three out of two people have difficulties with fractions.

More information about the R-SIG-Finance mailing list