Learn R Programming

dtGAP (version 0.0.2)

save_dtGAP: Save dtGAP Visualization to File

Description

Exports the dtGAP plot to PNG, PDF, or SVG format.

Usage

save_dtGAP(
  file,
  format = NULL,
  width = 297,
  height = 210,
  dpi = 300,
  bg = "white",
  ...
)

Value

Invisible file path of the created file.

Arguments

file

Character. Output file path. The format is inferred from the file extension unless format is specified explicitly.

format

Character or NULL. One of "png", "pdf", or "svg". If NULL (default), inferred from file extension.

width

Numeric. Page width in mm (default 297, A4 landscape).

height

Numeric. Page height in mm (default 210, A4 landscape).

dpi

Numeric. Resolution for PNG output (default 300). Ignored for PDF and SVG.

bg

Character. Background color (default "white").

...

Additional arguments passed to dtGAP().

Examples

Run this code
# \donttest{
save_dtGAP(
  file = tempfile(fileext = ".png"),
  data_train = train_covid,
  data_test = test_covid,
  target_lab = "Outcome",
  show = "test",
  print_eval = FALSE
)
# }

Run the code above in your browser using DataLab