Polygon centroid

st_centroid_within_poly(poly)

Arguments

poly

object of class sf, sfc, sfg or SpatialPolygons

References

https://stackoverflow.com/questions/52522872/r-sf-package-centroid-within-polygon https://stackoverflow.com/users/3609772/mitch.