Skip to content

html_table() error #204

Description

@jubjubbc

I'm somewhat new to scraping with R, but I'm getting an error message that I can't make sense of. A commenter on stackoverflow said that html_table() isn't handling the colspan logic correctly and suggested I file a bug report.

My code:

 url <- "https://en.wikipedia.org/wiki/California_State_Legislature,_2017%E2%80%9318_session"

leg <- read_html(url)

testdata <- leg %>% 
  html_nodes('table') %>% 
  .[6] %>% 
  html_table()

To which I get the response:

Error in out[j + k, ] : subscript out of bounds

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviortable 🏓

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions