I want to extract the "Match match by list" table from
http://stats.espncricinfo.com/ci/engine/player/50710.html?class=2;template=results;type=batting;view=match
I'm new to R so don't know much about extracting data from webpages. I used this code to extract the table.
fileUrl<- "http://stats.espncricinfo.com/ci/engine/player/50710.html?class=2;template=results;type=batting;view=match"
#load
sanga <-htmlTreeParse(fileUrl, useInternal=T)
sanga.data <-xpathSApply(sanga,"//tr[@class='data1']",xmlValue)
However I end up with a one column matrix where each column in the original table is represented as a row. I read the information in this thread but still cannot figure out how to get the data in a table format. Scraping html tables into R data frames using the XML package