pal is initialized to a vector of named elements (colors)
to define the scenario color scheme that is
used throughout the riskyr package.
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:
NColor representing the population ofNcases or individuals.cond_trueColor representing cases ofcond_true, for which the current condition isTRUE.cond_falseColor representing cases of incond_false, for which the current condition isFALSE.dec_posColor representing cases ofdec_pos, for which the current decision ispositive.dec_negColor representing cases indec_neg, for which the current decision isnegative.dec_corColor representing cases of correct decisionsdec_cor, for which the current decision isaccurate.dec_errColor representing cases of erroneous decisionsdec_err, for which the current decision isinaccurate.hiColor representing hits or true positives inhi(i.e., correct cases for which the current condition is TRUE and the decision is positive).miColor representing misses or false negatives inmi(i.e., incorrect cases for which the current condition is TRUE but the decision is negative).faColor representing false alarms or false positives infa(i.e., incorrect cases for which the current condition is FALSE but the decision is positive).crColor representing correct rejections or true negatives incr(i.e., correct cases for which the current condition is FALSE and the decision is negative).ppvColor representing positive predictive valuesPPV(i.e., the conditional probability that the condition is TRUE, provided that the decision is positive).npvColor representing negative predictive valuesNPV(i.e., the conditional probability that the condition is FALSE, provided that the decision is negative).txtColor used for text labels.brdColor used for borders.bgColor used for plot background (used to setpar(bg = bg_col)).
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_bwp,
pal_kn,
pal_mbw,
pal_mod,
pal_org,
pal_rgb,
pal_unikn,
pal_vir,
prob,
txt,
txt_TF,
txt_org
Examples
pal # shows all color names and current values
#> N cond_true cond_false dec_pos
#> "#E6E6E6FC" "lightgoldenrod1" "#BFBFBFFC" "#F7A97F"
#> dec_neg dec_cor dec_err hi
#> "#A6A6A6FC" "olivedrab4" "steelblue3" "#B8D989"
#> mi fa cr ppv
#> "#73C8EA" "#1D95C6" "#80B139" "#F26418"
#> npv txt brd bg
#> "#1D95C6" "#000000FC" "#3E3F3A" "white"
pal["hi"] # shows the current color for hits (true positives, TP)
#> hi
#> "#B8D989"
pal["hi"] <- "gold" # defines a new color for hits (true positives, TP)
