R tricks >

Generate a hexagonal grid covering an sf object

library(ggplot2)
library(sf)
library(rnaturalearth)

world <- ne_countries(scale = "medium", returnclass = "sf")
grid <- st_make_grid(world, square = FALSE, cellsize = 5)

ggplot() + 
  geom_sf(data = world) +
  geom_sf(data = grid, fill = NA, color = "red") +
  theme_void()

hexagonal grid