riskyr (version 0.2.0)

init_pal: Initialize basic color information.

Description

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

Usage

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

Run this code
# NOT RUN {
init_pal()          # => define and return a vector of current (default) colors
length(init_pal())  # => 15 named colors
pal <- init_pal(N_col = "steelblue4")  # => change a color (stored in pal)
pal <- init_pal(brd_col = NA)          # => remove a color

# }

Run the code above in your browser using DataCamp Workspace