Similar to cbind( shp , st_coordinates(st_centroid(shp)))

getCentroids(shp)

Arguments

shp,

sf object

Value

shp with 2 new lng and lat columns