pal is initialized to a vector of named elements (colors) to define the scenario color scheme that is used throughout the riskyr package.

pal

Format

An object of class character of length 15.

Details

All color information corresponding to the current scenario is stored as named colors in a vector pal. To change a color, assign a new color to an existing element name.

pal currently contains colors with the following names:

  1. N Color representing the population of N cases or individuals.

  2. cond_true Color representing cases of cond_true, for which the current condition is TRUE.

  3. cond_false Color representing cases of in cond_false, for which the current condition is FALSE.

  4. dec_pos Color representing cases of dec_pos, for which the current decision is positive.

  5. dec_neg Color representing cases in dec_neg, for which the current decision is negative.

  6. dec_cor Color representing cases of correct decisions dec_cor, for which the current decision is accurate.

  7. dec_err Color representing cases of erroneous decisions dec_err, for which the current decision is inaccurate.

  8. hi Color representing hits or true positives in hi (i.e., correct cases for which the current condition is TRUE and the decision is positive).

  9. mi Color representing misses or false negatives in mi (i.e., incorrect cases for which the current condition is TRUE but the decision is negative).

  10. fa Color representing false alarms or false positives in fa (i.e., incorrect cases for which the current condition is FALSE but the decision is positive).

  11. cr Color representing correct rejections or true negatives in cr (i.e., correct cases for which the current condition is FALSE and the decision is negative).

  12. ppv Color representing positive predictive values PPV (i.e., the conditional probability that the condition is TRUE, provided that the decision is positive).

  13. npv Color representing negative predictive values NPV (i.e., the conditional probability that the condition is FALSE, provided that the decision is negative).

  14. txt Color used for text labels.

  15. brd Color used for borders.

Note that color names for frequencies correspond to frequency names, but are different for probabilities (which are written in lowercase and only PPV and NPV have assigned colors).

See also

init_pal initializes color information; num contains basic numeric parameters; init_num initializes basic numeric parameters; txt contains current text information; init_txt initializes text information; freq contains current frequency information; comp_freq computes current frequency information; prob contains current probability information; comp_prob computes current probability information.

Other lists containing current scenario information: accu, freq, num, pal_bw, pal_kn, pal_mbw, pal_mod, pal_org, pal_rgb, pal_vir, prob, txt_TF, txt_org, txt

Examples

pal # shows all current color names and values
#> N cond_true cond_false dec_pos dec_neg dec_cor #> "#E6E6E6FC" "#CCCCCCFC" "#BFBFBFFC" "#D9D9D9FC" "#A6A6A6FC" "olivedrab4" #> dec_err hi mi fa cr ppv #> "steelblue3" "#B8D989" "#73C8EA" "#1D95C6" "#80B139" "#F26418" #> npv txt brd #> "#1D95C6" "#000000FC" "#3E3F3A"
pal["hi"] # shows the current color for hits (true positives)
#> hi #> "#B8D989"
pal["hi"] <- "gold" # defines a new color for hits (true positives, TP)