powered by
knitAndSave
knitAndSave( plotToDraw, figCaption, file = NULL, path = NULL, figWidth = ufs::opts$get("ggSaveFigWidth"), figHeight = ufs::opts$get("ggSaveFigHeight"), units = ufs::opts$get("ggSaveUnits"), dpi = ufs::opts$get("ggSaveDPI"), catPlot = ufs::opts$get("knitAndSave.catPlot"), ... )
The knitFig() result, visibly.
knitFig()
The plot to knit using knitFig() and save using ggSave().
ggSave()
The caption of the plot (used as filename if no filename is specified).
The filename to use when saving the plot, or the path where to save the file if no filename is provided (if path is also omitted, getWd() is used).
path
getWd()
The plot dimensions, by default specified in inches (but 'units' can be set which is then passed on to ggSave().
The units and DPI of the image which are then passed on to ggSave().
Whether to use cat() to print the knitr fragment.
cat()
Additional arguments are passed on to ggSave(). Note that file (and ...) are vectorized (see the ggSave() manual page).
if (FALSE) plot <- ggBoxplot(mtcars, 'mpg'); knitAndSave(plot, figCaption="a boxplot", file=tempfile(fileext=".png"));
Run the code above in your browser using DataLab