Learn R Programming

riskyr (version 0.1.0)

init_txt: Initialize basic text elements.

Description

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

Usage

init_txt(scen.lbl = txt.def$scen.lbl, scen.txt = txt.def$scen.txt,
  scen.src = txt.def$scen.src, scen.apa = txt.def$scen.apa,
  scen.lng = txt.def$scen.lng, popu.lbl = txt.def$popu.lbl,
  cond.lbl = txt.def$cond.lbl, cond.true.lbl = txt.def$cond.true.lbl,
  cond.false.lbl = txt.def$cond.false.lbl, dec.lbl = txt.def$dec.lbl,
  dec.pos.lbl = txt.def$dec.pos.lbl, dec.neg.lbl = txt.def$dec.neg.lbl,
  hi.lbl = txt.def$hi.lbl, mi.lbl = txt.def$mi.lbl,
  fa.lbl = txt.def$fa.lbl, cr.lbl = txt.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 brief description of the current target population popu or sample.

cond.lbl

A name for the condition or feature (e.g., some disease) currently considered.

cond.true.lbl

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

cond.false.lbl

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

dec.lbl

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

dec.pos.lbl

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

dec.neg.lbl

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

hi.lbl

A 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 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 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 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.

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

Examples

Run this code
# NOT RUN {
init_txt()          # => defines a list of (default) text elements
length(init_txt())  # => 16

# Customizing current text elements:
txt <- init_txt(scen.lbl = "US or Them",
                scen.src = "Some stable genius",
                popu.lbl = "We, the people")

# }

Run the code above in your browser using DataLab