st_centroid_xy: Spatial Centroid X and Y

View source: R/st_centroid_xy.R

st_centroid_xyR Documentation

Spatial Centroid X and Y

Description

Creates two columns in a simple features (sf) data frame that correspond to the X and Y coordinates of the geometry/polygon.

Usage

st_dissolve(df,group_var)

Arguments

df

This is the dataframe you want to use. Must be in sf (simple features) format.

Value

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.

Author(s)

Andrew J. Van Leuven, vanleuven.3@osu.edu


andrewvanleuven/rleuven documentation built on July 19, 2022, 12:13 a.m.