Rather than reading from a file, glossary objects can be created inline.
as_glossary(...)
A new glossary object.
For all entries in the new object, the abbreviation is set to the label.
See update_abbrev()
to customize the abbreviation.
Entries that have duplicate labels will be dropped with a warning.
as_glossary(wt = "weight", ht = "height", bmi = "body mass index")
#> wt : weight
#> ht : height
#> bmi : body mass index
as_glossary(wt = "weight", ht = "height", wt = "baseline weight")
#> Warning: Dropping duplicate glossary labels:
#> • wt: baseline weight
#> wt : weight
#> ht : height
l <- list(VPC = "visual predictive check", tz = "timezone")
as_glossary(l)
#> VPC : visual predictive check
#> tz : timezone
as_glossary(l, wt = "weight")
#> VPC : visual predictive check
#> tz : timezone
#> wt : weight