Learn R Programming

sugarbag (version 0.1.6)

fortify_hexagon: Creates the points that define a hexagon polygon for plotting

Description

Creates the points that define a hexagon polygon for plotting

Usage

fortify_hexagon(data, sf_id, hex_size)

Value

a data frame of the seven points used to draw a hexagon

Arguments

data

a data frame created by the allocate function

sf_id

a string to indicate the column to identify individual polygons

hex_size

a float value in degrees for the diameter of the hexagons

Examples

Run this code
# same column is used in create_centroids
fortify_hexagon(data = tas_lga_hexctr, sf_id = "lga_code_2016", hex_size = 0.2)

Run the code above in your browser using DataLab