# NOT RUN {
# the original object
coords <- data.frame(x = c(30, 60, 60, 40, 10, 40, 20),
y = c(40, 40, 60, 70, 10, 20, 40),
fid = c(1, 1, 1, 1, 2, 2, 2))
window <- data.frame(x = c(0, 80),
y = c(0, 80))
aGeom <- gs_polygon(anchor = coords, window = window)
# stretch several geoms
visualise(geom = gt_stretch(geom = aGeom, x = list(0.5), y = list(1, 0.2)))
# stretch single geom
visualise(geom = gt_stretch(geom = aGeom, x = 0.5, fid = 1))
# }
Run the code above in your browser using DataLab