save_plot_to_file: Save a non-ggplot2 plot to a png file

save_plot_to_fileR Documentation

Save a non-ggplot2 plot to a png file

Description

Save a non-ggplot2 plot to a png file

Usage

save_plot_to_file(code, filename, width = 1000, height = 750)

Arguments

code

A code chunk that produces a plot

filename

The desired filename

width

Width of image

height

Height of image

Value

The output of the code chunk if any, invisibly

Examples

plot(1:3)
save_plot_to_file(plot(1:3), filename = "test.png")
file.remove("test.png")

Deleetdk/kirkegaard documentation built on May 2, 2024, 7:12 p.m.