lastpar <- par(mfrow = c(1, 1))
library(sf)
library(terra)
options(sf_use_s2 = FALSE)
ncpath <- system.file("shape/nc.shp", package = "sf")
nc <- read_sf(ncpath)
nc <- st_transform(nc, "EPSG:5070")
nc_comp_region <-
par_pad_grid(
nc,
mode = "grid",
nx = 4L, ny = 2L,
padding = 10000)
par_split_list(nc_comp_region)
par(lastpar)
Run the code above in your browser using DataLab