generate slides based on output
generate_slides(
outputs,
outfile = paste0(tempdir(), "/output.pptx"),
template = file.path(system.file(package = "autoslider.core"), "theme/basic.pptx"),
fig_width = 9,
fig_height = 6,
t_lpp = 20,
t_cpp = 200,
l_lpp = 20,
l_cpp = 150,
...
)
List of output
Out file path
Template file path
figure width in inch
figure height in inch
An integer specifying the table lines per page
Specify this optional argument to modify the length of all of the table displays
An integer specifying the table columns per page
Specify this optional argument to modify the width of all of the table displays
An integer specifying the listing lines per page
Specify this optional argument to modify the length of all of the listings display
An integer specifying the listing columns per page
Specify this optional argument to modify the width of all of the listings display
arguments passed to program
No return value, called for side effects
# Example 1. When applying to the whole pipeline
library(dplyr)
data <- list(
adsl = eg_adsl %>% dplyr::mutate(FASFL = SAFFL),
adae = eg_adae
)
filters::load_filters(
yaml_file = system.file("filters.yml", package = "autoslider.core"),
overwrite = TRUE
)
spec_file <- system.file("spec.yml", package = "autoslider.core")
spec_file %>%
read_spec() %>%
filter_spec(program %in% c("t_dm_slide")) %>%
generate_outputs(datasets = data) %>%
decorate_outputs() %>%
generate_slides()
#> ✔ 2/51 outputs matched the filter condition `program %in% c("t_dm_slide")`.
#> ❯ Running program `t_dm_slide` with suffix 'FAS'.
#> Filter 'FAS' matched target ADSL.
#> 400/400 records matched the filter condition `FASFL == 'Y'`.
#> ❯ Running program `t_dm_slide` with suffix 'FAS'.
#> Filter 'FAS' matched target ADSL.
#> 400/400 records matched the filter condition `FASFL == 'Y'`.
#> [1] " Patient Demographics and Baseline Characteristics, Full Analysis Set"
#> Warning: Calling `add_slide()` without specifying a `layout` is deprecated.
#> Please pass a `layout` or use `layout_default()` to set a default.
#> => I will now continue with the former `layout` default "Title and Content" for backwards compatibility...
#> [1] " Patient Demographics and Baseline Characteristics, Full Analysis Set (cont.)"
#> Warning: Calling `add_slide()` without specifying a `layout` is deprecated.
#> Please pass a `layout` or use `layout_default()` to set a default.
#> => I will now continue with the former `layout` default "Title and Content" for backwards compatibility...
#> [1] " Patient Demographics and Baseline Characteristics, Full Analysis Set (cont.)"
#> Warning: Calling `add_slide()` without specifying a `layout` is deprecated.
#> Please pass a `layout` or use `layout_default()` to set a default.
#> => I will now continue with the former `layout` default "Title and Content" for backwards compatibility...
#> [1] " Patient Demographics and Baseline Characteristics, Full Analysis Set"
#> Warning: Calling `add_slide()` without specifying a `layout` is deprecated.
#> Please pass a `layout` or use `layout_default()` to set a default.
#> => I will now continue with the former `layout` default "Title and Content" for backwards compatibility...
#> [1] " Patient Demographics and Baseline Characteristics, Full Analysis Set (cont.)"
#> Warning: Calling `add_slide()` without specifying a `layout` is deprecated.
#> Please pass a `layout` or use `layout_default()` to set a default.
#> => I will now continue with the former `layout` default "Title and Content" for backwards compatibility...
#> [1] " Patient Demographics and Baseline Characteristics, Full Analysis Set (cont.)"
#> Warning: Calling `add_slide()` without specifying a `layout` is deprecated.
#> Please pass a `layout` or use `layout_default()` to set a default.
#> => I will now continue with the former `layout` default "Title and Content" for backwards compatibility...
#> [1] " Patient Demographics and Baseline Characteristics, Full Analysis Set (cont.)"
#> Warning: Calling `add_slide()` without specifying a `layout` is deprecated.
#> Please pass a `layout` or use `layout_default()` to set a default.
#> => I will now continue with the former `layout` default "Title and Content" for backwards compatibility...
# Example 2. When applying to an rtable object or an rlisting object
adsl <- eg_adsl
t_dm_slide(adsl, "TRT01P", c("SEX", "AGE")) %>%
generate_slides()
#> [1] "Demographic slide"
#> Warning: Calling `add_slide()` without specifying a `layout` is deprecated.
#> Please pass a `layout` or use `layout_default()` to set a default.
#> => I will now continue with the former `layout` default "Title and Content" for backwards compatibility...