updatedist: update the list of the already nown distances between...

Description Usage Arguments Value Examples

View source: R/Distances.R

Description

update the list of the already nown distances between subjects with distances between new infected and exposed

Usage

1
2
3
4
5
6
7
8
updatedist(
  closedistances = NULL,
  U,
  sicks,
  new.sicks = NULL,
  delta = 0.005,
  dist_areas = dist_areas_f(U, delta)
)

Arguments

closedistances

NULL, or a named list with 2 named elements: closedistances$ra, closedistances$id

U

a data.frame with the variables hexagon (can be any bin identifier), x, y : coordinates,

sicks

a vector of integers indicating the row numbers in U for sicks

new.sicks

a vector of integers indicating the row numbers in U for new sicks

delta

a positive number : a threshold

dist_areas:

a function between

Value

NULL, or a named list with 2 named elements: closedistances$ra, closedistances$id

Examples

1
2
3
4
5
data(UE,package="Strategy")
delta<-.005
sicks<-which(UE$I001=="sick")
closedistances=updatedist(NULL,UE,sicks,delta=delta)
do.call(cbind,closedistances)[1:3,]

DanielBonnery/Strategy documentation built on Dec. 17, 2021, 4:03 p.m.