dsts.below.threshold: most fcns that would be here are just moved to the sending...

Description Usage Arguments Details Examples

View source: R/spW-fcns.R View source: R/creating SpWs/local & sample generations/block group neighbors spWs.R

Description

In R/creating SpWs/sending della jobs/ dsts.below.threshold

Usage

1
dsts.below.threshold(sfx, i, j.colm = "nbs")

Arguments

sfx

an sf object to selectively get distances from i, probably containing point geometries.

i

row # index of given tract/centroid in sfx

j.colm

list-column of geoids in sfx to get distance from

Details

Quick fcn with hardcoded items, including assumption of meters from crs length unit

Examples

 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)

kmcd39/divflow documentation built on Dec. 21, 2021, 7:38 a.m.