Description Usage Arguments Details Examples
View source: R/spW-fcns.R View source: R/creating SpWs/local & sample generations/block group neighbors spWs.R
In R/creating SpWs/sending della jobs/ dsts.below.threshold
1 | dsts.below.threshold(sfx, i, j.colm = "nbs")
|
sfx |
an sf object to selectively get distances from i, probably containing point geometries. |
i |
row # index of given tract/centroid in |
j.colm |
list-column of geoids in |
Quick fcn with hardcoded items, including assumption of meters from crs length unit
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
ctrs <- cts %>% st_centroid()
dst.nbs <-
st_is_within_distance(ctrs
, dist =
units::set_units(20,'miles'))
cts$nbs <- map(dst.nbs, ~tmp[., ]$geoid)
ctrs %>%
mutate(dists =
map(1:nrow(ctrs)
,~dsts.below.threshold(ctrs, ., 'nbs')))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.