Writes the plots of a summarizeSCI() or summarizeByVisitSCI() result,
or a single plot such as res$plots$hb, each into its own file.
Usage
save_plots(
x,
file_name = NULL,
file_path = ".",
format = "png",
width = 8,
height = 5,
res = 300
)Arguments
- x
The result of
summarizeSCI()orsummarizeByVisitSCI()(made withtype = "both"or"plot"), or a single plot, e.g.res$plots$hb.- file_name
Name(s) of the files, without extension. Either one name per plot, or a single name that prefixes the variable names when
xholds several plots (e.g."fig"givesfig_hb.png,fig_hb_cat.png). Default isNULL, which names each file after its variable (hb.png).- file_path
Folder to write the files into. Created if it does not exist. Default is the working directory.
- format
File format:
"png"(the default),"jpeg","tiff","pdf"or"svg".- width, height
Size of the plot in inches. Default is 8 by 5.
- res
Resolution in dots per inch, for the pixel formats. Default is 300.