R/centroid.R
ps_sfc_centroid1.Rd
Uses st_combine as opposed to st_union.
ps_sfc_centroid1( x, sfc_name = ps_active_sfc_name(x), by = character(0), nearest = FALSE )
The object
A string of the sfc column name
A character vector of the columns to get the centroid by.
A flag indicating whether to return the point closest to the centroid (as opposed to the actual centroid)
Sf object of centroid