sample1 <- minimal_html("
Col ACol B
1x
4y
10z
")
sample1 %>%
html_element("table") %>%
html_table()
# Values in merged cells will be duplicated
sample2 <- minimal_html("
ABC
123
45
67
")
sample2 %>%
html_element("table") %>%
html_table()
# If a row is missing cells, they'll be filled with NAs
sample3 <- minimal_html("
ABC
12
3
4
")
sample3 %>%
html_element("table") %>%
html_table()
Run the code above in your browser using DataLab