Learn R Programming

spork (version 0.3.5)

as.png.plotmath: Convert Plotmath to PNG

Description

Converts plotmath to png.

Usage

# S3 method for plotmath
as.png(
  x,
  filename = tempfile(),
  width = 3,
  height = 1,
  units = "in",
  res = 150,
  ...
)

Value

invisible filepath

Arguments

x

plotmath; see as_plotmath

filename

path for image file

width

width

height

height

units

units

res

resolution

...

passed arguments

See Also

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

Other png: as.png.spork()

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

Examples

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

Run the code above in your browser using DataLab