View source: R/collapse_2_rgn.R
collapse_2_rgn | R Documentation |
Collapse data for duplicate regions.
collapse_2_rgn(
df_in,
fld_value,
fld_id = "rgn_id",
collapse_fxn = c("sum", "mean", "weighted_mean")[1],
collapse_wts = NULL
)
df_in |
dataset |
fld_value |
field with value, defaults to 'value' |
fld_id |
|
collapse_fxn |
function to collapse duplicate regions into one (example: China, Macau, Hong Kong) |
collapse_wts |
table with weights if weighted mean function is chosen |
This function collapses duplicate regions (example: China, Macau, Hong Kong)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.