pentagon <- sfshape_ngon(0, 0, sides = 5, radius = 1)
hexagon <- sfshape_ngon(2, 0, sides = 6, radius = 1)
plot(sf::st_sfc(pentagon, hexagon))
many <- sfshape_ngons(7, sides = c(3, 5, 8), radius = 0.4)
plot(many)
Run the code above in your browser using DataLab