Return formatted notes from a tex glossary file or glossary object

glossary_notes(x, ...)

# S3 method for class 'character'
glossary_notes(x, ..., format = guess_glo_fmt(x))

# S3 method for class 'list'
glossary_notes(x, ...)

# S3 method for class 'glossary'
glossary_notes(x, ..., sep = ": ", collapse = "; ")

Arguments

x

path to a tex glossary file, a glossary object, or a list that can be coerced to a glossary object with as_glossary().

...

unquoted glossary labels to be included in the notes text.

format

passed to read_glossary().

sep

character to separate name and value.

collapse

a character used to collapse definitions into a single string.

Examples

file <- system.file("glo", "glossary.tex", package = "pmtables")

glossary_notes(file, WT, CRCL)
#> [1] "WT: subject weight; CRCL: Cockcroft-Gault calculated creatinine clearance based on total body weight"

g <- as_glossary(ss = "steady state", ALB = "albumin", WT = "weight")

glossary_notes(g, ALB, ss)
#> [1] "ALB: albumin; ss: steady state"

what <- c("WT", "NCA", "NPDE")

g <- read_glossary(file)

glossary_notes(g, tidyselect::all_of(what))
#> [1] "WT: subject weight; NCA: noncompartmental analysis; NPDE: normalized prediction distribution error"

l <- list(ss = "steady state", ALB = "albumin", WT = "weight")

glossary_notes(l, ALB, ss)
#> [1] "ALB: albumin; ss: steady state"