Learn R Programming

spork (version 0.3.5)

as_preview.plotmath: 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 plotmath
as_preview(x, stem = "plotmath_preview", width = 3, height = 1, ...)

Value

invisible filepath

Arguments

x

spork; see as_spork

width

passed to as.png.plotmath

height

passed to as.png.plotmath

...

passed arguments

See Also

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

Examples

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

Run the code above in your browser using DataLab