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
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:
To which I get the response: