The bug can be reproduced using an example table from Wikipedia (couldn't find a English example page, this page lists the parliament members of Turkey).
bug <- read_html('https://tr.wikipedia.org/wiki/TBMM_8._d%C3%B6nem_milletvekilleri_listesi') %>%
html_nodes('.wikitable') %>%
html_table(fill = TRUE)
bug[[1]][136:142,]
This happens because nrows is not updated when rowspans are filled. For instance in this case, when i == 2 and j == 138, nrows[[j]][i] will be 7, although it should be 1.
This has an easy fix, I'll be creating a PR soon.
The bug can be reproduced using an example table from Wikipedia (couldn't find a English example page, this page lists the parliament members of Turkey).
This happens because
nrowsis not updated when rowspans are filled. For instance in this case, wheni == 2andj == 138,nrows[[j]][i]will be 7, although it should be 1.This has an easy fix, I'll be creating a PR soon.