Description Usage Arguments Value Examples
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.
1 2 | create_patch(mydata = NULL, RegState = NULL, fit_level = 3,
mod_level = 2)
|
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. |
An updated version of ‘mydata’ with only the RegState elements in $fit and the aggregated super-region in $model
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.