xpose_save: Save xpose plot

Description Usage Arguments Examples

View source: R/xpose_save.R

Description

Inspired by the ggsave, this function facilitates the export of xpose plots.

Usage

1
2
3
xpose_save(plot = last_plot(), file = NULL, dir = NULL,
  device = NULL, width = 7, height = 6, units = c("in", "cm",
  "mm"), dpi = 200, ...)

Arguments

plot

A xpose plot object.

file

A name with file extension (if device is NULL) to be given to the output file. Template variables such as @run (run number) and @plotfun (plot function) can be used to automatically name files e.g. file = '@[email protected]'.

dir

Directory under which the xpose plots will be saved. Template variables such as @dir can be used to generate template names.

device

Graphical device to use. Can be either be a device function (e.g. png), or one of 'eps', 'ps', 'tex' (pictex), 'pdf' (default), 'jpeg', 'tiff', 'png', 'bmp', 'svg' or 'wmf' (windows only).

width, height

Plot size in units.

units

Units of the plot size ('in', 'cm', or 'mm').

dpi

Plot resolution. Applies only to raster output types.

...

Additional arguments passed on to ggsave or graphics device.

Examples

1
2
3
4
5
6
## Not run: 
xpdb_ex_pk %>% 
 dv_vs_ipred() %>% 
 xpose_save(file = file.path(tempdir(), "dv_vs_ipred_example.pdf"))

## End(Not run)

guiastrennec/xpose documentation built on Aug. 20, 2018, 3:43 a.m.