save_output: Save an Output

View source: R/save_output.R

save_outputR Documentation

Save an Output

Description

Save an Output

Usage

save_output(output, file_name, save_rds = TRUE)

save_output(output, file_name, save_rds = TRUE)

save_output.autoslider_error(output, file_name, save_rds = TRUE)

## S4 method for signature 'dVTableTree'
save_output(output, file_name, save_rds = TRUE)

save_output.decoratedGrob(output, file_name, save_rds = TRUE)

save_output.decoratedGrobSet(output, file_name, save_rds = TRUE)

save_output.dlisting(output, file_name, save_rds = TRUE)

Arguments

output

Output object, e.g. an 'rtable' or 'grob'

file_name

Full path of the new file *excluding* the extension

save_rds

Saved as an '.rds' files

Details

Tables are saved as RDS file

Value

The input 'object' invisibly

No return value, called for side effects

The input 'object' invisibly

The input 'object' invisibly

The input 'object' invisibly

Examples

library(dplyr)
adsl <- eg_adsl %>%
  filter(SAFFL == "Y") %>%
  mutate(TRT01P = factor(TRT01P, levels = c("A: Drug X", "B: Placebo")))
output_dir <- tempdir()
t_dm_slide(adsl, "TRT01P", c("SEX", "AGE", "RACE", "ETHNIC", "COUNTRY")) %>%
  decorate(
    title = "Demographic table",
    footnote = ""
  ) %>%
  save_output(
    file_name = file.path(output_dir, "t_dm_SE"),
    save_rds = TRUE
  )


autoslider.core documentation built on April 4, 2025, 2:05 a.m.