[R] extract tables as data.frames from HTML source

Yihui Xie xieyihui at gmail.com
Fri Apr 3 08:18:37 CEST 2009


Hi,

I wonder whether there is any convenient function (or package) to
extract tables from a HTML page? e.g. from
http://www.google.com/finance/historical?q=SHE:002251

I know we can readLines('URL'), gsub('<td>...', '...', source), ...
and at last get the numbers; I'm writing to ask whether someone has
already contributed a more general function (with the package XML or
other packages). Thanks!

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China




More information about the R-help mailing list