[R] How to pass parameters to htmlParse Bank of Canada html pages

guox at ucalgary.ca guox at ucalgary.ca
Tue Jun 30 22:32:30 CEST 2009


To get USDCAD rates from Bank of Canada, we first go

url <- "http://banqueducanada.ca/en/rates/exchange-avg.html"

select 12 months for Rates for the past and click "Get Rates" button. Then
the page moves to

address <- "http://banqueducanada.ca/cgi-bin/famecgi_fdps"

and the rates show in the html page.

htmlParse() can read the html document but
htmlParse(address) did not work since we need to pass the selected field
value and clicking Get Rates button event parameters to
http://banqueducanada.ca/en/rates/exchange-avg.html.
I was wondering if you know how to load in data from such html pages. Thanks,

-james




More information about the R-help mailing list