hafen / geofacet

R package for geographical faceting with ggplot2
https://hafen.github.io/geofacet/
Other
338 stars 45 forks source link

Example for custom grid produces an error #380

Open jdlee opened 2 years ago

jdlee commented 2 years ago

The following from the documentation fails to run

custom grid (move Wisconsin above Michigan)

my_grid <- us_state_grid1 my_grid$col[my_grid$code == "WI"] <- 7

ggplot(state_ranks, aes(variable, rank, fill = variable)) + geom_col() + coord_flip() + facet_geo(~ state, grid = my_grid)

Produces this error: grid 'my_grid' not found in package, checking online... Error in get_grid(grid) : grid 'my_grid' not recognized...

stedy commented 2 years ago

Can you please port some more details such as the output of sessionInfo()? I was able to run this without an error using R 4.2.0