compTable: Rank comparison table between two COINs

Description Usage Arguments Value See Also Examples

View source: R/coin_compare.R

Description

Takes two COINs, and generates a rank comparison between specified indicator/aggregates. COINs must share at least some common unit codes, and the indicator selected by isel.

Usage

1
2
3
4
5
6
7
8
compTable(
  COIN1,
  COIN2,
  dset = "Raw",
  isel,
  COINnames = NULL,
  sort_by = "AbsRankChange"
)

Arguments

COIN1

First COIN

COIN2

Second COIN

dset

The data set of interest

isel

The indicator/column of interest

COINnames

An optional character vector of the names of COIN1 and COIN2, to be used in the table headers.

sort_by

If "RankCOIN1", sorts by the indicator values of COIN1, if "RankCOIN2", sorts by COIN2, if "RankChange", sorts by rank change, and if "AbsRankChange" sorts by absolute rank change.

Value

A data frame with ranks and rank changes between two COINs.

See Also

Examples

1
2
3
4
5
6
7
8
9
ASEM <- build_ASEM()
# Make a copy
ASEMAltNorm <- ASEM
# Edit .$Method
ASEMAltNorm$Method$normalise$ntype <- "borda"
# Regenerate
ASEMAltNorm <- regen(ASEMAltNorm, quietly = TRUE)
# compare
CT <- compTable(ASEM, ASEMAltNorm, dset = "Aggregated", isel = "Index")

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