as_preview.plotmath: Preview Spork as Plotmath

View source: R/preview.R

as_preview.plotmathR Documentation

Preview Spork as Plotmath

Description

Preview spork after conversion to plotmath. Creates and displays a temporary png file with a parsed expression.

Usage

## S3 method for class 'plotmath'
as_preview(x, stem = "plotmath_preview", width = 3, height = 1, ...)

Arguments

x

spork; see as_spork

width

passed to as.png.plotmath

height

passed to as.png.plotmath

...

passed arguments

Value

invisible filepath

See Also

Other preview: as.png.plotmath(), as.png.spork(), as_preview.latex(), as_previews.spork(), as_previews(), as_preview(), ggplot.plotmath(), ggplot.spork()

Examples

library(magrittr)
'one joule (Omega) ~ 1 kg*m^2./s^2' %>%
as_spork %>%
as_plotmath %>%
as_preview

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