init_pal {riskyr} | R Documentation |
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"],
bg_col = pal_def["bg"],
brd_col = pal_def["brd"]
)
Arguments
N_col |
Color representing the population of |
cond_true_col |
Color representing cases of |
cond_false_col |
Color representing cases of in |
dec_pos_col |
Color representing cases of |
dec_neg_col |
Color representing cases in |
dec_cor_col |
Color representing cases of correct decisions |
dec_err_col |
Color representing cases in erroneous decisions |
hi_col |
Color representing hits or true positives in |
mi_col |
Color representing misses or false negatives in |
fa_col |
Color representing false alarms or false positives in |
cr_col |
Color representing correct rejections or true negatives in |
PPV_col |
Color representing positive predictive values |
NPV_col |
Color representing negative predictive values |
txt_col |
Color used for text labels. |
bg_col |
Background color of plot (used to set |
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
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