mirror of
https://github.com/msberends/AMR.git
synced 2026-03-19 13:42:25 +01:00
Replace {.fun} with {.help} for all exported functions in messaging
All function names referenced via {.fun …} in cli-style messages are
exported in NAMESPACE, so {.help …} is the appropriate markup — it
renders as a clickable help link rather than plain function styling.
https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
This commit is contained in:
6
R/mdro.R
6
R/mdro.R
@@ -170,9 +170,9 @@ mdro <- function(x = NULL,
|
||||
meet_criteria(infer_from_combinations, allow_class = "logical", has_length = 1)
|
||||
|
||||
if (isTRUE(only_sir_columns) && !any(is.sir(x))) {
|
||||
stop_("There were no SIR columns found in the data set, despite {.arg only_sir_columns} being {.code TRUE}. Transform columns with {.fun as.sir} for valid antimicrobial interpretations.")
|
||||
stop_("There were no SIR columns found in the data set, despite {.arg only_sir_columns} being {.code TRUE}. Transform columns with {.help as.sir} for valid antimicrobial interpretations.")
|
||||
} else if (!isTRUE(only_sir_columns) && !any(is.sir(x)) && !any(is_sir_eligible(x))) {
|
||||
stop_("There were no eligible SIR columns found in the data set. Transform columns with {.fun as.sir} for valid antimicrobial interpretations.")
|
||||
stop_("There were no eligible SIR columns found in the data set. Transform columns with {.help as.sir} for valid antimicrobial interpretations.")
|
||||
}
|
||||
|
||||
# get gene values as TRUE/FALSE
|
||||
@@ -251,7 +251,7 @@ mdro <- function(x = NULL,
|
||||
guideline.bak <- guideline
|
||||
if (is.list(guideline)) {
|
||||
# Custom MDRO guideline ---------------------------------------------------
|
||||
stop_ifnot(inherits(guideline, "custom_mdro_guideline"), "use {.fun custom_mdro_guideline} to create custom guidelines")
|
||||
stop_ifnot(inherits(guideline, "custom_mdro_guideline"), "use {.help custom_mdro_guideline} to create custom guidelines")
|
||||
if (isTRUE(info)) {
|
||||
txt <- paste0(
|
||||
"Determining MDROs based on custom rules",
|
||||
|
||||
Reference in New Issue
Block a user