For some work I plan on doing for the LACE tech focus blog I wanted to get some information off a webpage and in to an R dataframe. It turns out this is a three line solution (1 line if you throw your URL straight to the function paramaters and have the XML package already installed).

theurl <- "<URL STRING>"
data_frame_of_table <- readHTMLTable(theurl,which=<table number>, = TRUE

I’m pretty sure this is something I will need later in life.. thought I better blog it somewhere..

Categories: Data Analytics


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *