gen_hsa: Generate HSAs

Description Usage Arguments Details Value

View source: R/gen_hsa.r

Description

Generate HSAs

Usage

1
2
3
gen_hsa(shp, from, to, li_threshold = 0.4, min_interventions = 10,
  plot = TRUE, verbose = FALSE, debug = 0, savePlots = NULL,
  plotOpts = list(height = 10, width = 15, units = "cm", res = 600))

Arguments

shp

shapefile SpatialPolygonsDataFrame

from

patients home region

to

patients destination

li_threshold

localization index threshold

plot

logical; display the iterations of the HSAs (defaults to TRUE)

verbose

logical; display information during iterations (defaults to FALSE)

savePlots

character with path and name to save plots to. Will be appended with the iteration number. Plots are saved as PNGs

...

additional options to png (only necessary when savePlots is not NULL)

Details

Rownames of shp should be in common with from and to. If this is not the case, warnings (if some are missing) or errors will be issued (if no names are in common). Rownames can be set via, e.g., spChFIDs(shp, shp@data$name).

Value

object of class hsa containing the following elements:

call

call to gen_hsa

lookup

final lookup table

lookups

intermediate lookup tables

original_data

list containing from and to originally submitted

from: from as submitted to gen_hsa

to: to as submitted to gen_hsa

reassigned_data

list containing from and to as assigned to HSAs

from: from converted to its HSA

to: to converted to its HSA

method

method used to assign each region to its HSA

original_shp

shapefile submitted to gen_hsa (via shp)

shp

shapefile containing HSAs

iterations

number of iterations

li

localization index of the HSAs

li_threshold

li_threshold option

min_interventions

min_interventions option

n

number of HSAs created

n_it

number of HSAs in each iteration

n_interventions

number of interventions in each HSA after the final iteration

names

name of each HSA

flow

flow amongst HSAs (as generated by flows)


aghaynes/HSAr documentation built on Sept. 20, 2021, 5:29 p.m.