save.figure: Save Figure and Associated Table

View source: R/save.R

save.figureR Documentation

Save Figure and Associated Table

Description

This function saves a figure generated by ggplot2 and its associated data table in multiple formats.

Usage

save.figure(
  g,
  tab,
  caption,
  path,
  fn,
  width = NA,
  height = NA,
  add.to.caption = NULL
)

Arguments

g

A ggplot object to save.

tab

A data frame or table that contains the data used to create the figure.

caption

A text caption for the figure.

path

A directory path where the files will be saved.

fn

The base filename (without extension) for the saved files.

width

Numeric value for the width of the figure. Default is NA.

height

Numeric value for the height of the figure. Default is NA.

add.to.caption

Optional additional text to append to the figure's caption.

Value

A message indicating the completion of the saving process.


DiogoFerrari/edar documentation built on Dec. 1, 2024, 10:47 p.m.