Skip to content

html_table(..., fill=TRUE) bug in filling rowspans down #215

Description

@oguzhanogreden

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviortable 🏓

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions