save_besthr: Save besthr plot to file

View source: R/export.R

save_besthrR Documentation

Save besthr plot to file

Description

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

## Not run: 
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")

## End(Not run)


besthr documentation built on March 18, 2026, 5:08 p.m.