Error when using geobr::read_municipality for year 2000
Closed this issue · 2 comments
PedroJorge7 commented
I encountered an error while trying to load municipality data for the year 2000 using the geobr package. The error occurs both when simplify is set to TRUE and FALSE.
Code
library(geobr)
# Attempt to read municipality data with simplified = TRUE
geobr::read_municipality(year = 2000, simplified = TRUE)
Using year 2000
Error in data.table::rbindlist(files, fill = TRUE) :
Class attribute on column 8 of item 5 does not match with column 8 of item 1.
# Attempt to read municipality data with simplified = FALSE
geobr::read_municipality(year = 2000, simplified = FALSE)
Using year 2000
Error in data.table::rbindlist(files, fill = TRUE) :
Class attribute on column 8 of item 5 does not match with column 8 of item 1.
rafapereirabr commented
hmmm, strange. I used your code and didn't get any error. What version of {geobr} are you using? Please install the latest stable version from CRAN and try it again.
library(geobr)
# Attempt to read municipality data with simplified = TRUE
geobr::read_municipality(year = 2000, simplified = TRUE)
# Attempt to read municipality data without simplified = FALSE
geobr::read_municipality(year = 2000, simplified = FALSE)
PedroJorge7 commented
I did the update and it worked! Thanks