textspec ValuesAdd or remove special, textspec-related prefixes from text strings.
This is an internal utility function, not intended to be called by package
users.
prefix_text(x, spec, action)Character vector like x, with prefixes added or removed. NA values
in x remain NA.
Character vector to which special prefixes are to be added or removed.
Character vector of valid textspec values. Recycled to match the
length of x if action is "add". Ignored if action is
"remove".
Character scalar, either "add" or "remove", depending on whether the
special prefix is to be added or removed from x.
Currently supported textspec values and the associated prefixes
are: "plain" (no prefix); "plotmath" (prefix MATH_); and "markdown"
(prefix MKDN_).
spec_from_text to derive spec by looking for special
prefixes in text strings.