get_closest_nn: create a grid of points indicating near border or not (and...

Description Usage Arguments Value

View source: R/bands.R

Description

This is internal code using RANN::nn2 (faster).

Usage

1
2
3
4
5
6
7
8
get_closest_nn(
  border_points,
  inner_points,
  delta,
  xrange = NULL,
  yrange = NULL,
  gridbreaks = 100
)

Arguments

border_points

data.frame of points from delta ball approach that are "border points"

inner_points

data.frame of points from delta ball approach that are interior points.

delta

float, size of delta ball radius

xrange

vector, ordered values to examine in the x dimension (default is NULL - will then be created using gridbreaks)

yrange

vector, ordered values to examine in the y dimension (default is NULL - will then be created using gridbreaks)

gridbreaks

int, number of gridpoint in x and y dimensions if xrange or yrange is not provided

Value

data frame, with expand.grid of xrange, yrange in columns x and y and a column z that indicates if it is: (1) not within delta to border points or inner_points, (2) if closest to border_points and (3) if closest to an inner_point.


skgallagher/EpiCompare documentation built on Sept. 14, 2021, 5:45 a.m.