create_patch: Create a New Region

Description Usage Arguments Value Examples

View source: R/data_fxns.R

Description

Using the populations specified in ‘RegState' create a new region. If the user lists multiple entries to 'RegState’, this function will aggregate those regions into a new super-region.

Usage

1
2
create_patch(mydata = NULL, RegState = NULL, fit_level = 3,
  mod_level = 2)

Arguments

mydata

A mydata structure resulting from get.cdc.data() that contains all the regions listed in ‘RegState’ in the $fit sub structure.

RegState

A vector of strings specifying either the name or abbreviation of US regions or states.

fit_level

An integer specifying the spatial-level of the elements of RegState. All elements of RegState must be from the same level.

mod_level

An integer that defines the spatial-level of the created region.

Value

An updated version of ‘mydata’ with only the RegState elements in $fit and the aggregated super-region in $model

Examples

1
2
3
require(DICE)
mydata = get.DICE.data()
mydata2 = create_patch(mydata=mydata,RegState=c('R1','R2','R3'),fit_level=mydata$fit$level,mod_level=2)

predsci/DICE documentation built on Aug. 9, 2019, 9:41 a.m.