modes | R Documentation |
set_mode()
sets the mode of operation of tcdkhelper
, mainly
affecting relative paths interpreted by save_kpi()
.
get_mode() set_mode(mode)
mode |
A string giving the mode of operation. When |
Currently, the following modes of operation is implemented in the
save_kpi()
function, and decide where (and if) a plot is saved:
"RStudio" saves to a subfolder of your current working directory called "KPI-PLOTS" (created if not already existing).
"batch" saves to the folder KPI-PLOTS on a network destination ("S-drive") shared within the TestCenter Danmark organisation.
"compile" does not save the file at all.
This is useful if you have manually opened a graphics device (e.g. by pdf()
and wish to print the plot to given device.
When set_mode()
is called with no mode
argument, a mode is decided as
follows: If save_kpi()
is called within RStudio, the mode "RStudio" is set.
If not, and a graphics device - other than the
"null device
" - is set, mode is set to "compile".
This mode generates no output, allowing for manually printing plots to
set device, minimizing the risk of duplicate plots in your destination.
Finally, if run outside RStudio with no graphics device, "batch" mode is set.
A string giving the current (or new) tcdkhelper mode.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.