as_plotmath.spar | R Documentation |
Converts one spork to plotmath.
See description for as_spork
.
Unrecognized tokens are returned
unmodified by default.
Otherwise, backslashes and single quotes are escaped,
and the result is wrapped in single quotes.
See plotmathToken
.
## S3 method for class 'spar'
as_plotmath(
x,
unrecognized = getOption("plotmath_unrecognized", spork::plotmathToken),
...
)
x |
spar |
unrecognized |
function to process unrecognized tokens |
... |
passed to |
Experimental support is implemented for
the sequence "backslash n" ('\n'
).
It tries 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.
character
plotmathToken
Other interface:
as.expression.plotmath()
,
as_html.spar()
,
as_html.spork()
,
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()
,
as_plotmath.greek()
,
as_plotmath.spork()
,
concatenate.plotmath()
,
ggplot.plotmath()
,
goodToken()
,
plotmathToken()
Other spar:
as_spar()
,
as_spar.default()
,
as_spar.spork()
library(magrittr)
'V_c./F' %>% as_spork %>% as_plotmath
'AUC_ss' %>% as_spork %>% as_plotmath
'C_max_ss' %>% as_spork %>% as_plotmath
'var^eta_j' %>% as_spork %>% as_plotmath
'& % $ # \\_ { } ~ \\^ \\' %>% as_spork %>% as_plotmath
'one joule (Omega) ~ 1 kg*m^2./s^2' %>% as_spork %>% as_plotmath
'one joule (`Omega`) ~ 1 kg*m^2./s^2' %>% as_spork %>% as_plotmath
'one joule (\\`Omega\\`) ~ 1 kg*m^2./s^2' %>% as_spork %>% as_plotmath
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.