# 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)
# translate several geoms
visualise(geom = gt_translate(geom = aGeom, x = 5, y = list(-10, 5)))
# translate a single geom
visualise(geom = gt_translate(geom = aGeom, x = 5, fid = 1))
# }
Run the code above in your browser using DataLab