Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AlexandraKapp/e23e0d4d2d635f950d0cbff4248caf32 to your computer and use it in GitHub Desktop.
Save AlexandraKapp/e23e0d4d2d635f950d0cbff4248caf32 to your computer and use it in GitHub Desktop.
library(sf)
xmin <- -2.3743
xmax <- 0.5589
ymin <- 37.3397
ymax <- 40.8679
st_polygon(list(rbind(
c(xmin, ymin),
c(xmin, ymax),
c(xmax, ymax),
c(xmax, ymin),
c(xmin, ymin)
))) %>%
st_sfc(crs = 4326)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment