compare_coins {COINr} | R Documentation |
Compare two coins
Description
Compares two coin class objects using a specified iCode
(column of data) from specified data sets.
Usage
compare_coins(
coin1,
coin2,
dset,
iCode,
also_get = NULL,
compare_by = "ranks",
sort_by = NULL,
decreasing = FALSE
)
Arguments
coin1 |
A coin class object |
coin2 |
A coin class object |
dset |
A data set that is found in |
iCode |
The name of a column that is found in |
also_get |
Optional metadata columns to attach to the table: see |
compare_by |
Either |
sort_by |
Optionally, a column name of the output data frame to sort rows by. Can be either
|
decreasing |
Argument to pass to |
Details
This function replaces the now-defunct compTable()
from COINr < v1.0.
Value
A data frame of comparison information.
Examples
# build full example coin
coin <- build_example_coin(quietly = TRUE)
# copy coin
coin2 <- coin
# change to prank function (percentile ranks)
# we don't need to specify any additional parameters (f_n_para) here
coin2$Log$Normalise$global_specs <- list(f_n = "n_prank")
# regenerate
coin2 <- Regen(coin2)
# compare index, sort by absolute rank difference
compare_coins(coin, coin2, dset = "Aggregated", iCode = "Index",
sort_by = "Abs.diff", decreasing = TRUE)