| compare_coins | R Documentation | 
Compares two coin class objects using a specified iCode (column of data) from specified data sets.
compare_coins(
  coin1,
  coin2,
  dset,
  iCode,
  also_get = NULL,
  compare_by = "ranks",
  sort_by = NULL,
  decreasing = FALSE
)
| 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  | 
This function replaces the now-defunct compTable() from COINr < v1.0.
A data frame of comparison information.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.