Learn R Programming

hexify (version 0.6.5)

HexData-class: HexData Class

Description

An S4 class representing hexified data. Contains the original user data plus cell assignments from the hexification process.

Arguments

Slots

data

Data frame or sf object. The original user data (untouched).

grid

HexGridInfo object. The grid specification used.

cell_id

Cell IDs for each row of data. Numeric for ISEA grids, character for H3 grids.

cell_center

Matrix. Two-column matrix (lon, lat) of cell centers.

Details

HexData objects are created by hexify. The original data is preserved in the data slot, while cell assignments are stored separately in cell_id and cell_center.

Use as.data.frame() to get a combined data frame with cell columns.

See Also

hexify for creating HexData objects, HexGridInfo-class for grid specifications