save_gtsummary: Outputs the Table Created by the gtsummary package in Various...

View source: R/save_gtsummary.R

save_gtsummaryR Documentation

Outputs the Table Created by the gtsummary package in Various File Formats.

Description

This function is used to output the table created by the gtsummary package in PowerPoint or Word, or as an image file. It just wraps gtsummary's as_flex_table and flextalbe's save_as* functions.

Usage

save_gtsummary(
  x,
  path,
  values = NULL,
  pr_section = NULL,
  zoom = 3,
  expand = 10,
  webshot = "webshot"
)

Arguments

x

gtsummary table object.

path

PowerPoint or Word or Image file to be created. It should end with filename extensions. Supported filename extensions: .pptx, .docx, .png, .pdf, .jpg.

values

a list (possibly named), each element is a flextable object. If named objects, names are used as slide titles.

pr_section

a prop_section object that can be used to define page layout such as orientation, width and height.

zoom

parameters used by webshot function.

expand

parameters used by webshot function.

webshot

webshot package as a scalar character, one of "webshot" or "webshot2".

Details

The as_flex_table argument of gtsummary is the default, so if you want to fine-tune it, you can do it yourself.


indenkun/infun documentation built on April 17, 2025, 2:52 p.m.