eechidna (version 1.4.0)

extract_centroids: Extract centroids from the polygons within a shapefile.

Description

Extract centroids from the polygons within a shapefile.

Usage

extract_centroids(shapefile)

Arguments

shapefile

SpatialPolygonsDataFrame containing polygons

Value

list containing centroids as SpatialPoints and a dataframe with basic data on each polygon (e.g. name)

Examples

Run this code
# NOT RUN {
sF_download(year = 2016)
electorate_centroids_2016 <- extract_centroids(sF_16)
# }

Run the code above in your browser using DataLab