indChange: Add and remove indicators

Description Usage Arguments Value See Also Examples

View source: R/coin_regen.R

Description

A shortcut function to add and remove indicators. This will make the relevant changes and recalculate the index if asked. Adding and removing is done relative to the current set of indicators used in calculating the index results. Any indicators that are added must of course be present in .$Input$Original (in both IndData and IndMeta).

Usage

1
indChange(COIN, add = NULL, drop = NULL, regen = FALSE)

Arguments

COIN

COIN object

add

A character vector of indicator codes to add (must be present in the original input data)

drop

A character vector of indicator codes to remove (must be present in the original input data)

regen

Logical (default): if TRUE, automatically regenerates the results based on the new specs Otherwise, just updates the .$Method$assemble parameters. This latter might be useful if you want to Make other changes before re-running using the regen() function.

Value

An updated COIN, with regenerated results if regen = TRUE.

See Also

Examples

1
2
3
4
5
6
# build ASEM example
ASEM <- build_ASEM()
# remove one indicator and regenerate results
ASEM2 <- indChange(ASEM, drop = "UNVote", regen = TRUE)
# compare the differences
CT <- compTable(ASEM, ASEM2, dset = "Aggregated", isel = "Index")

COINr documentation built on Nov. 30, 2021, 9:06 a.m.