# NOT RUN {
# create a polygon programmatically
coords <- data.frame(x = c(40, 70, 70, 50),
y = c(40, 40, 60, 70))
(aGeom <- gs_polygon(anchor = coords))
visualise(aGeom)
window <- data.frame(x = c(0, 80),
y = c(0, 80))
(aGeom <- setWindow(x = aGeom, to = window))
visualise(aGeom)
# }
Run the code above in your browser using DataLab