Skip to contents

A hierarchical list of multilingual labels used in graphical representations of uncertainty, sensitivity analysis, and calendars (plot_sa(), plot_uncertainty(), plot_sobol(), plot_sa_triplet(), plot_calendar_state()).

Usage

label_graphic

Format

A nested named list structured by function -> tag -> language:

  • common: Shared labels for indicators: npv, benefit, npv_short, benefit_short.

  • plot_uncertainty: Labels for histogram and density distributions: main_npv, main_benefit, xlab_npv, xlab_benefit, ylab_freq, ylab_dens.

  • plot_sobol: Labels for Sobol sensitivity index barplots: main_both, main_total, main_first, xlab, leg_cost, leg_period, leg_hydraulic, leg_impact.

  • plot_sa_triplet: Panel and indicator titles for the 3-parameter sensitivity triplet layout: main_npv, main_benefit.

  • plot_calendar_state: Labels for calendar state barplots: xlab, ylab, state, state_item, type_simple, type_probabilistic, main. Each terminal node provides translations across 11 languages (ISO 639-1 codes): English ("en"), French ("fr"), Spanish ("es"), Italian ("it"), German ("de"), Portuguese ("pt"), Chinese ("zh"), Japanese ("ja"), Russian ("ru"), Arabic ("ar"), and Hindi ("hi").

Details

label_graphic is loaded automatically by the package and queried internally by get_label() to support multilingual labeling of figures across 11 supported languages (ISO 639-1: en, fr, es, it, de, pt, zh, ja, ru, ar, hi). Any unsupported or missing language code automatically falls back to English ("en").

It is built from data-raw/label_graphic.yml.

Author

Frédéric Grelot, frederic.grelot.1994_cran@m4x.org

Examples

# Sections included in graphical labels
names(label_graphic)
#> [1] "common"              "plot_uncertainty"    "plot_sobol"         
#> [4] "plot_sa_triplet"     "plot_calendar_state"

# Supported language codes for an indicator
names(label_graphic$common$npv)
#>  [1] "en" "fr" "es" "it" "de" "pt" "zh" "ja" "ru" "ar" "hi"

# English, French, and Spanish labels for NPV
label_graphic$common$npv[c("en", "fr", "es")]
#> $en
#> [1] "Net Present Value (NPV)"
#> 
#> $fr
#> [1] "Valeur Actuelle Nette (VAN)"
#> 
#> $es
#> [1] "Valor Actual Neto (VAN)"
#> 

# Labels used in plot_uncertainty
names(label_graphic$plot_uncertainty)
#> [1] "main_npv"     "main_benefit" "xlab_npv"     "xlab_benefit" "ylab_freq"   
#> [6] "ylab_dens"   

# Labels used in plot_calendar_state
names(label_graphic$plot_calendar_state)
#> [1] "xlab"               "ylab"               "state"             
#> [4] "state_item"         "type_simple"        "type_probabilistic"
#> [7] "main"