Get indices within k distance of the origin index.
Details
Elements of the output array may be left as zero, which can happen when crossing a pentagon.
k-ring 0 is defined as the origin index, k-ring 1 is defined as k-ring 0 and all neighboring indexes, and so on.
Examples
gridDisk(cell = c("8cbe63562a54bff","8cbe635631103ff"), k = c(1L, 2L))
#> [[1]]
#> [1] "8cbe63562a54bff" "8cbe63562a549ff" "8cbe63562a541ff" "8cbe63562a543ff"
#> [5] "8cbe63562a55dff" "8cbe63562a737ff" "8cbe63562a735ff"
#>
#> [[2]]
#> [1] "8cbe635631103ff" "8cbe635631101ff" "8cbe635631107ff" "8cbe635631139ff"
#> [5] "8cbe635631115ff" "8cbe63563111dff" "8cbe63563110bff" "8cbe635631109ff"
#> [9] "8cbe63563110dff" "8cbe635631105ff" "8cbe63563112bff" "8cbe63563113dff"
#> [13] "8cbe635631131ff" "8cbe63563113bff" "8cbe635631117ff" "8cbe635631111ff"
#> [17] "8cbe635631119ff" "8cbe635631157ff" "8cbe635631155ff"
#>