Grab HTML table using XML



I am trying to read an html table using the package XML, but even though it looks easy, I haven’t managed to do it. I tried everything, but the names of the columns are always fixed by R as V1, V2, V3,…


This is the code:



require(XML)

tbl <- readHTMLTable("http://ift.tt/1slVhEo”,
header = c("year","ring","CO2", "stem","root","leaf","fine root", "NPP"),
skip.rows=c(1,2),colClasses=c(rep("factor",3),rep("numeric",5)))


Many thanks for your help


No comments:

Post a Comment