plotmathToken: Process Plotmath Token

View source: R/plotmath.R

plotmathTokenR Documentation

Process Plotmath Token

Description

Processes a plotmath 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; see goodToken

unescape

whether to escape (unrecognized) backslash

...

ignored arguments

Value

plotmath

See Also

Other plotmath: [.plotmath(), [[.plotmath(), as.expression.plotmath(), as.png.plotmath(), as_plotmath.spar(), as_plotmath.spork(), as_plotmath(), concatenate.plotmath(), ggplot.plotmath(), goodToken()

Other interface: as.expression.plotmath(), as_html.spar(), as_html.spork(), as_latex.default(), as_latex.spar(), as_latex.spork(), as_plotmath.spar(), as_plotmath.spork(), as_previews.spork(), as_spork.character(), htmlToken(), latexToken()

Examples

plotmathToken("can't")
plotmathToken("\\", unescape = TRUE)
plotmathToken("\\", unescape = FALSE)
plotmathToken("\n", conditional = TRUE)
plotmathToken("\n", conditional = FALSE)

spork documentation built on Sept. 16, 2023, 9:06 a.m.

Related to plotmathToken in spork...