Learn R Programming

hexify (version 0.3.8)

dgverify: Verify grid object

Description

Validates that a grid object has all required fields and valid values. This function is called internally by most hexify functions to ensure grid integrity.

Usage

dgverify(dggs)

Value

TRUE (invisibly) if valid, otherwise throws an error

Arguments

dggs

Grid object to verify (from hexify_grid)

Examples

Run this code
grid <- hexify_grid(area = 1000, aperture = 3)
dgverify(grid)  # Should pass silently

# Invalid grid will throw error
bad_grid <- list(aperture = 5)
try(dgverify(bad_grid))  # Will error

Run the code above in your browser using DataLab