Wrapper for `g_mean_general()`. Requires filtering of the datasets (e.g. using SUFFIX in spec.yml)
g_lb_slide(
adsl,
adlb,
arm = "TRT01P",
paramcd = "PARAM",
y = "AVAL",
subtitle = "Plot of Mean and 95% Confidence Limits by Visit.",
...
)
ADSL data
ADLB data
`"TRT01P"` by default
character scalar. defaults to By default `"PARAM"` Which variable to use for plotting.
character scalar. Variable to plot on the Y axis. By default `"AVAL"`
character scalar forwarded to g_lineplot
| Gets forwarded to `tern::g_lineplot()`. This lets you specify additional arguments to `tern::g_lineplot()`
library(dplyr)
adlb_filtered <- eg_adlb %>% filter(
PARAMCD == "CRP"
)
plot_lb <- g_lb_slide(
adsl = eg_adsl,
adlb = adlb_filtered,
paramcd = "PARAM",
subtitle_add_unit = FALSE
) +
ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 45, hjust = 1))
generate_slides(plot_lb, paste0(tempdir(), "/g_lb.pptx"))
#> 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...
# Let's plot change values:
plot_lb_chg <- g_lb_slide(
adsl = eg_adsl,
adlb = adlb_filtered,
paramcd = "PARAM",
y = "CHG",
subtitle = "Plot of change from baseline and 95% Confidence Limit by Visit."
)
generate_slides(plot_lb_chg, paste0(tempdir(), "/g_lb_chg.pptx"))
#> 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...