adibender / coalitions

Coalition probabilities in multi-party democracies
https://adibender.github.io/coalitions/
Other
21 stars 4 forks source link

Error caused by newly introduced NA columns in GMS Wahlrecht table #118

Closed bauer-alex closed 4 years ago

bauer-alex commented 4 years ago

coalitions::get_surveys()

leads to Error in `[.data.frame`(atab, , !ind.empty) : undefined columns selected. This is caused by the latest update of Wahlrecht's GMS table, which now leads to two trailing NA columns in the following dataset:

atab <- read_html(address) %>% html_nodes("table") %>% .[[2]] %>% html_table(fill = TRUE)

However, scrape_wahlrecht() currently cannot handle such NA columns.