Some of my code which previously yielded a warning message is now giving an error. Here is an example:
library(sf)
states <- tigris::states(cb = T) %>% select(state = NAME) %>% filter(state == "Wisconsin")
wi.counties <- tigris::counties(state = "WI", cb = T) %>% select(county = NAME)
st_crs(states) == st_crs(wi.counties)
[1] TRUE
intersection <- st_intersection(states, wi.counties)
Error: (converted from warning) attribute variables are assumed to be spatially constant throughout all geometries
Previously, I just got the message "Warning: attribute variables are assumed . . ."
Now, the code entirely values due to the warning being converted to an error.
My question
Why is this warning now being converted to an error, and how can I make it stop doing that?
I'm running {{sf}} version 1.0.7 on R 4.2.0.