View source: R/parse_html_table.R
| parse_html_table | R Documentation |
Parses an HTML table into a data.frame using base R only with no external dependencies The code relies purely on regular expressions and basic string and regex functions.
parse_html_table(html, table_start_pattern = "<TABLE[^>]*>")
html |
a single string containing the HTML body (or any larger HTML chunk) that includes the table you want to parse. |
By default the function grabs the first TABLE element it finds. If the HTML code
has several tables and you need a specific one, pass a regex that
matches its opening tag via table_start_pattern, e.g.:
parse_html_table(html, table_start_pattern = '<TABLE align="center" border=0[^>]*>')
description
data.frame with automatically detected column names (built from
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.