Writing Figures to a File
Initialize a plot that will be written directly to a file using pdf
, png
, etc. Within the function you will need to specify a name for your image, and the width and height (optional). Then create a plot using the usual functions in R. Finally, close the file using the dev.off()
function. There are also bmp
, tiff
, and jpeg
functions, though the jpeg
function has proven less stable than the others.
Last updated