as_plotmath.spar: Convert One Spork to Plotmath

View source: R/plotmath.R

as_plotmath.sparR Documentation

Convert One Spork to Plotmath

Description

Converts one spork to plotmath. See description for as_spork. By default, unrecognized tokens are returned unmodified if they are parseable. Otherwise, backslashes and single quotes are escaped, and the result is wrapped in single quotes. See plotmathToken.

Usage

## S3 method for class 'spar'
as_plotmath(
  x,
  unrecognized = getOption("plotmath_unrecognized", "plotmathToken"),
  ...
)

Arguments

x

spar

unrecognized

function to process unrecognized tokens: default plotmathToken

...

passed to unrecognized; see plotmathToken

Details

Experimental support is implemented for the newline character ('\n'). It trys to break the expression at the point indicated, and stack the results. Active subscripts and superscripts are closed in advance, preventing these from breaking across lines.

Value

character atop(',

See Also

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

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

Other spar: as_spar.spork(), as_spar()


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