# NOT RUN {
input <- matrix(nrow = 100, ncol = 100, data = 0)
# create a random polygon with five vertices
set.seed(1)
someGeom <- gs_random(type = "polygon", vertices = 5)
visualise(geom = someGeom)
# in case template is given, this serves as source for the window extent
library(magrittr)
gs_random(template = input) %>%
visualise(geom = ., new = FALSE, linecol = "red")
# }
Run the code above in your browser using DataLab