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 = "]*>")
description
data.frame with automatically detected column names (built from
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[^>]*>')