get_centroid: Get centroid from a sf object

View source: R/tidy_functions.R

get_centroidR Documentation

Get centroid from a sf object

Description

Add columns from a sf object with centroids (x, y).

Usage

get_centroid(.sf)

Arguments

.sf

A sf object

Details

Create and add the coordinates (x, y) of the centroids to the dataframe

Value

X Y columns with centroid

Author(s)

Jhon Flores Rojas

Examples

library(PeruData)
#map_peru_dist |>
#  filter(depa == "huanuco") |>
#   get_centroid()

TJhon/PeruData documentation built on March 30, 2022, 8:26 p.m.