Learn R Programming

gofigR (version 1.1.3)

create_ggsave_args: Creates a list of arguments for ggplot2::ggsave() with optional dimension and DPI parameters.

Description

Creates a list of arguments for ggplot2::ggsave() with optional dimension and DPI parameters.

Usage

create_ggsave_args(
  filename,
  plot,
  width = NULL,
  height = NULL,
  units = "in",
  dpi = NULL
)

Value

list of arguments suitable for do.call(ggplot2::ggsave, ...)

Arguments

filename

output filename

plot

plot object

width

width of the output image. If NULL, not included in arguments.

height

height of the output image. If NULL, not included in arguments.

units

units for width and height. If NULL, not included in arguments.

dpi

resolution of the output image. If NULL, not included in arguments.