Skip to contents

Saves a besthr visualization to a file with sensible publication defaults. Supports PNG, PDF, SVG, and TIFF formats.

Usage

save_besthr(
  hrest,
  filename,
  type = "default",
  width = 8,
  height = 6,
  dpi = 300,
  ...
)

Arguments

hrest

An hrest object from estimate

filename

Output filename. Format is detected from extension.

type

Plot type: "default" (two-panel) or "raincloud"

width

Plot width in inches (default 8)

height

Plot height in inches (default 6)

dpi

Resolution in dots per inch (default 300)

...

Additional arguments passed to the plot function (e.g., theme, colors)

Value

The filename (invisibly)

Examples

if (FALSE) { # \dontrun{
d <- make_data()
hr <- estimate(d, score, group)
save_besthr(hr, "figure1.png")
save_besthr(hr, "figure1.pdf", width = 10, height = 8)
save_besthr(hr, "figure1.png", type = "raincloud")
} # }