Hi I try to import html text and I need to split the fields at each <td> or </td> entry How can I succeed? sep = '<td>' doens't yield the right result thanks for hints
scan html: sep = "<td>"
3 messages · Christoph Lehmann, Uwe Ligges, Eric Lecoutre
Christoph Lehmann wrote:
Hi I try to import html text and I need to split the fields at each <td> or </td> entry How can I succeed? sep = '<td>' doens't yield the right result
If it fits pairwise together, use
sep=c("<td>", "</td>")
if not, you can read the whole lot with readLines and strsplit for both
pattern after that, for example.
Uwe Ligges
thanks for hints
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
You can import the whole thing and use on it "strsplit" ?strsplit Eric Eric Lecoutre UCL / Institut de Statistique Voie du Roman Pays, 20 1348 Louvain-la-Neuve Belgium tel: (+32)(0)10473050 lecoutre at stat.ucl.ac.be http://www.stat.ucl.ac.be/ISpersonnel/lecoutre If the statistics are boring, then you've got the wrong numbers. -Edward Tufte
-----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Christoph Lehmann Sent: lundi 4 avril 2005 16:51 To: r-help at stat.math.ethz.ch Subject: [R] scan html: sep = "<td>" Hi I try to import html text and I need to split the fields at each <td> or </td> entry How can I succeed? sep = '<td>' doens't yield the right result thanks for hints
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html