Repository navigation
Document batch TLF generation with meta_run() - #269
Conversation
yihui
left a comment
There was a problem hiding this comment.
Thanks for the vignette extension. Two correctness/consistency issues and one cleanup, details inline or below.
Needs a fix (line 243, outside the diff so not inline)
Approach 1 forest plot ignores the plan: prepare_ae_forestly() with no arguments falls back to all parameters (any, drug-related, serious), while the batch output 4 uses only drug-related;serious. It also makes the "explicitly selects its population, observation, and parameters" sentence (line 165) untrue for this pipeline. Suggested change to lines 242-245:
meta |>
prepare_ae_forestly(
population = "apat",
observation = "apat",
parameter = "drug-related;serious"
) |>
format_ae_forestly() |>
ae_forestly()Inline suggestions
## Approach 2should be###to match### Approach 1under## TLF generation.- The original
## Summaryclosing section was dropped; suggest restoring it.
Not inline-suggestable
- Each pipeline now appears twice (Approach 1 chunks and the Approach 2 wrappers), so the two copies can drift (e.g.
meddra_version,default_page_size,source). Consider defining the wrappers once up front and having Approach 1 call them with explicit arguments, e.g.ae_summary(meta, "apat", "apat", "any;drug-related"), or add a sentence noting the wrappers intentionally mirror Approach 1 and must be kept in sync. Fine to keep the current form if the side-by-side pipeline is the teaching goal.
Co-authored-by: Yihui Xie <xie@yihui.name>
Co-authored-by: Yihui Xie <xie@yihui.name>
| @@ -231,9 +245,103 @@ meta |> | |||
| ae_forestly() | |||
There was a problem hiding this comment.
I think this call needs the same arguments as the batch wrapper, or the two outputs differ.
prepare_ae_forestly() with no parameter falls back to every parameter in meta (any, drug-related, serious). Plan 4 (line 100) and batch output 4 use only drug-related;serious, so this plot shows an extra parameter.
Line 243 should read:
prepare_ae_forestly(
population = "apat",
observation = "apat",
parameter = "drug-related;serious"
) |>This also makes the sentence above ("explicitly selects its population, observation, and parameters") true for this pipeline. population and observation are optional here since there is one of each, but they match the other three pipelines.
Or the comment on line 100 was wrong?
Summary
Extend the multiple-table vignette to demonstrate generating multiple TLFs from a single metadata object using
metalite::meta_run().Closes #268.
Changes
meta$plan.iargument.ae_forest_plotas the forest plot analysis name to distinguish it from theforestly::ae_forestly()renderer.Validation
i = c(1, 2)returns the two static tables.Documentation only; no package API changes.