as_previews.spork {spork} | R Documentation |
Compare Previews of Spork
Description
Compares plotmath and latex previews of spork Generates png for both, and overlays latex above plotmath.
Usage
## S3 method for class 'spork'
as_previews(x, wide = 70, long = 20, width = 3, height = 1, sleep = 2, ...)
Arguments
x |
length-one spork |
wide |
width in mm of the latex image |
long |
length in mm of the latex image |
width |
width (default: inches) of the plotmath image |
height |
height (default: inches) of the plotmath image |
sleep |
how long to pause after html before latex/plotmath |
... |
passed arguments |
Value
invisible list of filepaths
See Also
Other preview:
as.png.plotmath()
,
as.png.spork()
,
as_preview.html()
,
as_preview.latex()
,
as_preview.plotmath()
,
as_previews.default()
,
as_previews()
,
as_preview()
,
ggplot.plotmath()
,
ggplot.spork()
Other interface:
as.expression.plotmath()
,
as_html.spar()
,
as_html.spork()
,
as_latex.spar()
,
as_latex.spork()
,
as_plotmath.spar()
,
as_plotmath.spork()
,
as_spork.character()
,
htmlToken()
,
latexToken()
,
plotmathToken()
Other spork:
[.spork()
,
[[.spork()
,
as.list.spork()
,
as.png.spork()
,
as_html.spork()
,
as_latex.spork()
,
as_plotmath.spork()
,
as_spar.default()
,
as_spar.spork()
,
as_spork.character()
,
as_spork.factor()
,
as_spork.spork()
,
as_spork()
,
ggplot.spork()
,
greek()
Examples
library(magrittr)
specials <- '& % $ # \\_ { } ~ \\^ \\'
# specials %>% as_spork %>% as_previews
# specials %>% gsub(' ','',.) %>% as_spork %>% as_previews
# 'one joule (Omega) ~ 1 kg*m^2./s^2' %>% as_spork %>% as_previews
# disambiguation for plotmath and latex (see \code{\link[grDevices]{plotmath}}):
# 'epsilon.varepsilon' %>% as_spork %>% as_previews
# 'rho.varrho' %>% as_spork %>% as_previews
# 'Upsilon.Upsilon1' %>% as_spork %>% as_previews
# 'phi.phi1.varphi' %>% as_spork %>% as_previews
# 'sigma.sigma1.varsigma.stigma' %>% as_spork %>% as_previews
# 'theta.vartheta.theta1' %>% as_spork %>% as_previews
# 'omega.omega1.pi.varpi' %>% as_spork %>% as_previews