prefix_text: Add or Remove the Prefix Associated with 'textspec' Values

Description Usage Arguments Details Value See Also

View source: R/text_util.bare.R

Description

Add or remove special, textspec-related prefixes from text strings. This is an internal utility function, not intended to be called by package users.

Usage

1
prefix_text(x, spec, action)

Arguments

x

Character vector to which special prefixes are to be added or removed.

spec

Character vector of valid textspec values. Recycled to match the length of x if action is "add". Ignored if action is "remove".

action

Character scalar, either "add" or "remove", depending on whether the special prefix is to be added or removed from x.

Details

Currently supported textspec values and the associated prefixes are: "plain" (no prefix); "plotmath" (prefix MATH_); and "markdown" (prefix MKDN_).

Value

Character vector like x, with prefixes added or removed. NA values in x remain NA.

See Also

spec_from_text to derive spec by looking for special prefixes in text strings.


tablesgg documentation built on June 3, 2021, 1:06 a.m.