init_pal initializes basic color information (i.e., all colors corresponding to functional roles in the current scenario and used throughout the riskyr package).

init_pal(N_col = pal_def["N"], cond_true_col = pal_def["cond_true"],
  cond_false_col = pal_def["cond_false"],
  dec_pos_col = pal_def["dec_pos"], dec_neg_col = pal_def["dec_neg"],
  dec_cor_col = pal_def["dec_cor"], dec_err_col = pal_def["dec_err"],
  hi_col = pal_def["hi"], mi_col = pal_def["mi"],
  fa_col = pal_def["fa"], cr_col = pal_def["cr"],
  PPV_col = pal_def["ppv"], NPV_col = pal_def["npv"],
  txt_col = pal_def["txt"], brd_col = pal_def["brd"])

Arguments

N_col

Color representing the population of N cases or individuals.

cond_true_col

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

cond_false_col

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

dec_pos_col

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

dec_neg_col

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

dec_cor_col

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

dec_err_col

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

hi_col

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

mi_col

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

fa_col

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).

cr_col

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).

PPV_col

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

NPV_col

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

txt_col

Color used for text labels.

brd_col

Color used for borders (e.g., around bars or boxes).

Details

All color information of the current scenario is stored as named colors in a list pal. init_pal allows changing colors by assigning new colors to existing names.

See also

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

Other functions initializing scenario information: init_num, init_txt, riskyr

Examples

init_pal() # => define and return a vector of current (default) colors
#> N cond_true cond_false dec_pos #> "#E6E6E6FC" "lightgoldenrod1" "lightskyblue2" "rosybrown3" #> dec_neg dec_cor dec_err hi #> "lightsteelblue3" "palegreen3" "firebrick3" "olivedrab4" #> mi fa cr ppv #> "tomato3" "lightsalmon2" "olivedrab3" "sienna1" #> npv txt brd #> "steelblue3" "#030303FC" "#333333FC"
length(init_pal()) # => 15 named colors
#> [1] 15
pal <- init_pal(N_col = "steelblue4") # => change a color (stored in pal) pal <- init_pal(brd_col = NA) # => remove a color