init_txt: Initialize basic text elements.

View source: R/init_txt.R

init_txtR Documentation

Initialize basic text elements.

Description

init_txt initializes basic text elements txt (i.e., all titles and labels corresponding to the current scenario) that are used throughout the riskyr package.

Usage

init_txt(
  scen_lbl = txt_lbl_def$scen_lbl,
  scen_txt = txt_lbl_def$scen_txt,
  scen_src = txt_lbl_def$scen_src,
  scen_apa = txt_lbl_def$scen_apa,
  scen_lng = txt_lbl_def$scen_lng,
  popu_lbl = txt_lbl_def$popu_lbl,
  N_lbl = txt_lbl_def$N_lbl,
  cond_lbl = txt_lbl_def$cond_lbl,
  cond_true_lbl = txt_lbl_def$cond_true_lbl,
  cond_false_lbl = txt_lbl_def$cond_false_lbl,
  dec_lbl = txt_lbl_def$dec_lbl,
  dec_pos_lbl = txt_lbl_def$dec_pos_lbl,
  dec_neg_lbl = txt_lbl_def$dec_neg_lbl,
  acc_lbl = txt_lbl_def$acc_lbl,
  dec_cor_lbl = txt_lbl_def$dec_cor_lbl,
  dec_err_lbl = txt_lbl_def$dec_err_lbl,
  sdt_lbl = txt_lbl_def$sdt_lbl,
  hi_lbl = txt_lbl_def$hi_lbl,
  mi_lbl = txt_lbl_def$mi_lbl,
  fa_lbl = txt_lbl_def$fa_lbl,
  cr_lbl = txt_lbl_def$cr_lbl
)

Arguments

scen_lbl

The current scenario title (sometimes in Title Caps).

scen_txt

A longer text description of the current scenario (which may extend over several lines).

scen_src

The source information for the current scenario.

scen_apa

Source information in APA format.

scen_lng

Language of the current scenario (as character code). Options: "en": English, "de": German.

popu_lbl

A general name describing the current population.

N_lbl

A brief label for the current population popu or sample.

cond_lbl

A general name for the condition dimension currently considered (e.g., some clinical condition).

cond_true_lbl

A short label for the presence of the current condition or cond_true cases (the condition's true state of TRUE).

cond_false_lbl

A short label for the absence of the current condition or cond_false cases (the condition's true state of FALSE).

dec_lbl

A general name for the decision dimension (e.g., some diagnostic test) currently made.

dec_pos_lbl

A short label for positive decisions or dec_pos cases (e.g., predicting the presence of the condition).

dec_neg_lbl

A short label for negative decisions or dec_neg cases (e.g., predicting the absence of the condition).

acc_lbl

A general name for the accuracy dimension (e.g., correspondence of decision to condition).

dec_cor_lbl

A short label for correct decisions or dec_cor cases (e.g., accurately predicting the condition).

dec_err_lbl

A short label for erroneous decisions or dec_err cases (e.g., inaccurately predicting the condition).

sdt_lbl

A name for the case/category/cell dimension in the 2x2 contingency table (SDT: condition x decision).

hi_lbl

A short label for hits or true positives hi (i.e., correct decisions of the presence of the condition, when the condition is actually present).

mi_lbl

A short label for misses or false negatives mi (i.e., incorrect decisions of the absence of the condition when the condition is actually present).

fa_lbl

A short label for false alarms or false positives fa (i.e., incorrect decisions of the presence of the condition when the condition is actually absent).

cr_lbl

A short label for correct rejections or true negatives cr (i.e., a correct decision of the absence of the condition, when the condition is actually absent).

Details

All textual elements that specify titles and details of the current scenario are stored as named elements (of type character) in a list txt. init_txt allows changing elements by assigning new character objects to existing names.

However, you can directly specify scenario-specific text elements when defining a scenario with the riskyr function.

See Also

txt for current text settings; pal for current color settings; num for basic numeric parameters.

Other functions initializing scenario information: init_num(), init_pal(), riskyr()

Examples

init_txt()          # defines a list of (default) text elements
length(init_txt())  # 21

# Customizing current text elements:
txt <- init_txt(scen_lbl = "My scenario",
                scen_src = "My source",
                N_lbl = "My population")


riskyr documentation built on Aug. 15, 2022, 9:09 a.m.