I would like to import data into R from a table like this:
http://www.rout.gr/index.php?name=Rout&file=results&year=2011
I tried using XML library as suggested by the thread below but I couldn’t get anything.
Scraping html tables into R data frames using the XML package
There do seem to be some funky things going on with that site. It seems to return no data unless you fake the user-agent. Even then, readHTMLTable doesn’t behave too well, returning an error if you pass it the whole
doc. After reading the source, you can see that the relevant table has idtable_results_r_1and isolating that and passing the result through works:Now you’ll need to tidy up the table column names.