compare_coins_multi {COINr} | R Documentation |
Compare multiple coins
Description
Given multiple coins as a list, generates a rank comparison of a single indicator or aggregate which is specified
by the dset
and iCode
arguments (passed to get_data()
). The indicator or aggregate targeted must be available
in all the coins in coins
.
Usage
compare_coins_multi(
coins,
dset,
iCode,
also_get = NULL,
tabtype = "Values",
ibase = 1,
sort_table = TRUE,
compare_by = "ranks"
)
Arguments
coins |
A list of coins. If names are provided, these will be used in the tables returned by this function. |
dset |
The name of a data set found in |
iCode |
A column name of the data set targeted by |
also_get |
Optional metadata columns to attach to the table: see |
tabtype |
The type of table to generate. One of:
|
ibase |
The index of the coin to use as a base comparison (default first coin in list) |
sort_table |
If TRUE, sorts by the base COIN ( |
compare_by |
Either |
Details
By default, the ranks of the target indicator/aggregate of each coin will be merged using the uCode
s within each coin.
Optionally, specifying also_get
(passed to get_data()
) will additionally merge using the metadata columns.
This means that coins must share the same metadata columns that are returned as a result of also_get
.
This function replaces the now-defunct compTableMulti()
from COINr < v1.0.
Value
Data frame unless tabtype = "All"
, in which case a list of three data frames is returned.
Examples
# see vignette("adjustments")