mrggsave()
gains an argument called path.type
which controls how the path to the figure file is rendered in the figure annotation; the default is "proj"
, which will render the path relative to an RStudio project file, if it can be found; alternatives are "none"
and "raw"
; path.type
can be set through the mrggsave.path.type
option (#38, #39).
Unit tests were numbered and user stories added to build validation documents (#35, #37).
glue()
environment was captured so that string interpolation is more robust when attempted in unique environments (for example inside function calls) (#26)cairo_pdf
device now allows multiple plots to be written to the same file (#21)mrggsave:::output_file_sep()
titletag
#2mrggsave:::output_file_sep()
to globally change the output file separator character #12prefix
argument to mrggsave_common()
now defaults to NULL
; the Source graphic:
annotation defaults to only showing the base file name of the plotrlang::is_named
), use_names
will be set to TRUE
and names used for output filename #8named_plots
will set use_names
to TRUE
and the names will be use for output file names #8mrggsave_common()
now has a labeller
argument; pass a function to create the annotation for the plot; pass NULL
to save a plot with no annotation #8named_plots()
gains an argument called add_context
; when TRUE
, the context (usually the script name) will be pre-pended to the output file name; this argument is FALSE
by default #8mrggsave.file.tolower
which, if set to TRUE
will pass the file stem through base::tolower()
, making it all lower case, regardless of how the stem was generated #8dev
textGrob.y
to be inch
to ensure consistent bottom marginmrggsave_last
function); this gets the last plot via ggplot2::last_plot (#12)use_names
argument is invoked, plots will get written out to their own file names (#14)ggsurvplot
objects (#11)glue::glue
once it is formed from either stem
or tag
(e.g. stem = "dv_pred_{runnumber}"
) (#15)named_plots
function to generate plot names (and eventually file names) from the code used to generate the plot (#14)context
function to set the output file name when using tag
argument; context
is set and is in effect via option
until the context is changed or reset; use context_clear
ncol
as a formal argument; when ncol
> 1, we set arrange to TRUE
mrggpage
function as a wrapper around gridExtra::arrangeGrob
mrggsave_list
, which takes in a list of objects that are ready to label and to save without arrangementmrggdraw
so that all it does is draw a plot or plots, possibly after arrangingmrggdraw
now returns processed plots invisibly so that they may be passed into mrggsave
mrggsave_prep_object
and methods so that plots of different types can be passed directly to mrggsave_common
mrggsave.gList
for saving gList
objectstag
or stem
are given as a vector, the vector is collapsed using _
as a separator first prior to forming any output file namestag
, a _
separator is automatically placed between script
and the (possibly collapsed) tag
valuegtable
objectsmrggsave
method that assumes the object is a grobmrggpage
to allow a list of plots to be arranged across multiple pages; added methods for handling arrangelist
objects coming out of gridExtra::marrangeGrob