Re: [R] Re ad HTML table

2007-11-19 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 theta wrote: > > f.jamitzky wrote: >> You can use htmlTreeParse and xpathApply from the XML library. >> something like: >> >> xpathApply( htmlTreeParse("http://blabla";, useInt=T), "//td", function(x) >> xmlValue(x)) >> >> should do it. >> > > Than

Re: [R] Re ad HTML table

2007-11-19 Thread theta
f.jamitzky wrote: > > For fixed numbers of columns you can use > > data.frame(matrix(data, nrow, ncol)) > > in order to parse the XML data. > > htmlTreeParse should be rather quick, but in case it is too slow you could > use curl for downloading > the data and xmlstarlet for transformation

Re: [R] Re ad HTML table

2007-11-19 Thread f.jamitzky
For fixed numbers of columns you can use data.frame(matrix(data, nrow, ncol)) in order to parse the XML data. htmlTreeParse should be rather quick, but in case it is too slow you could use curl for downloading the data and xmlstarlet for transformation to XML. Then you can use xmlTreeParse or

Re: [R] Re ad HTML table

2007-11-18 Thread theta
f.jamitzky wrote: > > You can use htmlTreeParse and xpathApply from the XML library. > something like: > > xpathApply( htmlTreeParse("http://blabla";, useInt=T), "//td", function(x) > xmlValue(x)) > > should do it. > Thank you, any further ideas how to transform the result into a matrix, som

Re: [R] Re ad HTML table

2007-11-18 Thread f.jamitzky
You can use htmlTreeParse and xpathApply from the XML library. something like: xpathApply( htmlTreeParse("http://blabla";, useInt=T), "//td", function(x) xmlValue(x)) should do it. Gamma wrote: > > anyone care to explain how to read a html table, it's streaming data > (updated every second)