Learn R Programming

riskyr (version 0.1.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(col.N = pal.def["N"], col.true = pal.def["true"],
  col.false = pal.def["false"], col.pos = pal.def["pos"],
  col.neg = pal.def["neg"], col.hi = pal.def["hi"],
  col.mi = pal.def["mi"], col.fa = pal.def["fa"], col.cr = pal.def["cr"],
  col.ppv = pal.def["ppv"], col.npv = pal.def["npv"])

Arguments

col.N

Color representing the population of N cases or individuals.

col.true

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

col.false

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

col.pos

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

col.neg

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

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

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

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

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

col.ppv

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

col.npv

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

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

Examples

Run this code
# NOT RUN {
init_pal()          # => define and return a vector of current (default) colors
length(init_pal())  # => 11 colors
pal <- init_pal(col.false = "firebrick2")  # => change current color (stored in pal)


# }

Run the code above in your browser using DataLab