Save the currnently active RStudio as an image file.

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

Arguments

file

Target filename

format

Image format ("png", "jpeg", "bmp", "tiff", "emf", "svg", or "eps")

width

Image width in pixels

height

Image height in pixels

Note

The savePlotAsImage function was introduced in RStudio 1.1.57