Learn R Programming

spork (version 0.1.1)

plotmathToken: Quote a Token

Description

Quotes a token. Escapes single-quotes and wraps in single-quotes. Also maps 'varepsilon' to 'epsilon', since plotmath has only the latter; likewise 'varrho' maps to 'rho' and 'varpi' maps to 'omega1'.

Usage

plotmathToken(
  x,
  conditional = getOption("plotmath_conditional_quote", TRUE),
  unescape = getOption("plotmath_unescape", TRUE),
  ...
)

Arguments

x

(length-one) character

conditional

if true, return good tokens (parseable) unmodified

unescape

whether to escape (unrecognized) backslash

...

ignored arguments

Value

character

See Also

Other plotmath: as_plotmath.spork(), as_plotmath(), goodToken(), spork_to_plotmath()

Examples

Run this code
# NOT RUN {
plotmathToken("can't")
# }

Run the code above in your browser using DataLab