Learn R Programming

spork (version 0.3.5)

as.png.spork: Convert Spork to PNG

Description

Converts spork to png.

Usage

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

Value

invisible filepath

Arguments

x

spork; see as_spork

filename

path for image file

width

width

height

height

units

units

res

resolution

...

passed arguments

See Also

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

Other spork: [.spork(), [[.spork(), as.list.spork(), as_html.spork(), as_latex.spork(), as_plotmath.spork(), as_previews.spork(), as_spar.default(), as_spar.spork(), as_spork(), as_spork.character(), as_spork.factor(), as_spork.spork(), ggplot.spork(), greek()

Other png: as.png.plotmath()

Examples

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

Run the code above in your browser using DataLab