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.
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
)
The current scenario title (sometimes in Title Caps).
A longer text description of the current scenario (which may extend over several lines).
The source information for the current scenario.
Source information in APA format.
Language of the current scenario (as character code).
Options: "en"
: English, "de"
: German.
A general name describing the current population.
A brief label for the current population popu
or sample.
A general name for the condition dimension currently considered (e.g., some clinical condition).
A short label for the presence of the current condition
or cond_true
cases (the condition's true state of TRUE).
A short label for the absence of the current condition
or cond_false
cases (the condition's true state of FALSE).
A general name for the decision dimension (e.g., some diagnostic test) currently made.
A short label for positive decisions
or dec_pos
cases (e.g., predicting the presence of the condition).
A short label for negative decisions
or dec_neg
cases (e.g., predicting the absence of the condition).
A general name for the accuracy dimension (e.g., correspondence of decision to condition).
A short label for correct decisions
or dec_cor
cases (e.g., accurately predicting the condition).
A short label for erroneous decisions
or dec_err
cases (e.g., inaccurately predicting the condition).
A name for the case/category/cell dimension in the 2x2 contingency table (SDT: condition x decision).
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).
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).
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).
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).
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.
init_txt() # defines a list of (default) text elements
#> $scen_lbl
#> [1] "Scenario"
#>
#> $scen_txt
#> [1] "Description of the current scenario in a short paragraph of text. This description may include several sentences."
#>
#> $scen_src
#> [1] "Source information"
#>
#> $scen_apa
#> [1] "Source information in APA format"
#>
#> $scen_lng
#> [1] "en/de"
#>
#> $popu_lbl
#> [1] "Population"
#>
#> $N_lbl
#> [1] "N"
#>
#> $cond_lbl
#> [1] "Condition"
#>
#> $cond_true_lbl
#> [1] "True"
#>
#> $cond_false_lbl
#> [1] "False"
#>
#> $dec_lbl
#> [1] "Decision"
#>
#> $dec_pos_lbl
#> [1] "Positive"
#>
#> $dec_neg_lbl
#> [1] "Negative"
#>
#> $acc_lbl
#> [1] "Accuracy"
#>
#> $dec_cor_lbl
#> [1] "Correct"
#>
#> $dec_err_lbl
#> [1] "Erroneous"
#>
#> $sdt_lbl
#> [1] "Cases"
#>
#> $hi_lbl
#> [1] "hi"
#>
#> $mi_lbl
#> [1] "mi"
#>
#> $fa_lbl
#> [1] "fa"
#>
#> $cr_lbl
#> [1] "cr"
#>
length(init_txt()) # 21
#> [1] 21
# Customizing current text elements:
txt <- init_txt(scen_lbl = "My scenario",
scen_src = "My source",
N_lbl = "My population")