r <- raster::raster(matrix(1:9, 3, 3))
sq_grid <- make_grid(r, type = "square")
raster::plot(r)
hex_grid <- make_grid(sq_grid[9,], cell_width = 0.1, type = "hexagonal", clip=TRUE)
sp::plot(sq_grid, add = TRUE)
sp::plot(hex_grid, add = TRUE, border = "red", lwd = 2)
Run the code above in your browser using DataLab