Save the plot currently displayed in the Plots pane as an image.

savePlotAsImage(
  file,
  format = c("png", "jpeg", "bmp", "tiff", "emf", "svg", "eps"),
  width,
  height
)

Arguments

file

The target file path.

format

The Image format. Must be one of ("png", "jpeg", "bmp", "tiff", "emf", "svg", or "eps").

width

The image width, in pixels.

height

The image height, in pixels.

Note

The savePlotAsImage function was introduced in RStudio 1.1.57.