Take the geometry column of an sf point object and turn it into columns of the data.frame

sfc_as_cols(x, names = c("lon", "lat"))

Arguments

x

An object of class df sf

names

The desired names for the x and y columns, a string of c("lon", "lat") is the default

Value

a data.frame