grid <- hexify_grid(area = 1000, aperture = 3)
stats <- dgearthstat(grid)
print(sprintf("Resolution %d has %.0f cells",
stats$resolution, stats$n_cells))
print(sprintf("Average cell area: %.2f km^2",
stats$cell_area_km2))
print(sprintf("Average cell spacing: %.2f km",
stats$cell_spacing_km))
Run the code above in your browser using DataLab