View source: R/st_centroid_xy.R
st_centroid_xy | R Documentation |
Creates two columns in a simple features (sf) data frame that correspond to the X and Y coordinates of the geometry/polygon.
st_dissolve(df,group_var)
df |
This is the dataframe you want to use. Must be in sf (simple features) format. |
This function uses the already exisitng st_centroid function, but instead of creating a column with a two-value vector, it creates two columns. These two columns pertain to the X and Y coordinates of the generated geometric centroid.
Andrew J. Van Leuven, vanleuven.3@osu.edu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.