library(sf)
# Load some spatial data
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
# Configure inset map
config_insetmap(
bbox = sf::st_bbox(nc),
specs = list(
inset_spec(main = TRUE),
inset_spec(
xmin = -84, xmax = -75, ymin = 33, ymax = 37,
loc = "left bottom",
width = 0.3
)
)
)
# Retrieve the configuration
cfg <- last_insetcfg()
Run the code above in your browser using DataLab