You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/customize-width.Rmd
+98-2Lines changed: 98 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,14 @@ knitr::opts_chunk$set(
24
24
```{r}
25
25
library(forestly)
26
26
library(metalite)
27
+
library(dplyr)
27
28
```
28
29
29
30
The interactive AE forest plots include AE-specific tables presenting numerical values for AE proportions, differences, and confidence intervals (CI), alongside their visualizations. Each type of information is displayed in a separate column. In this vignette, we demonstrate how to customize the column widths in these tables.
30
31
31
-
# Step 1: build your metadata
32
+
# General Use
33
+
34
+
## Step 1: build your metadata
32
35
33
36
Building interactive AE forest plots starts with constructing the metadata. The detailed procedure for building metadata is covered in the vignette [Generate Interactive AE Forest Plots with Drill Down to AE Listing](https://merck.github.io/forestly/articles/forestly.html). Therefore, in this vignette, we will skip those details and directly use the metadata created there.
subset = SAFFL == "Y", label = "All Patient as Treated"
170
+
) |>
171
+
define_observation(
172
+
name = "apat", group = "TRTA",
173
+
subset = SAFFL == "Y", label = "All Patient as Treated"
174
+
) |>
175
+
define_parameter(
176
+
name = "any",
177
+
subset = NULL,
178
+
label = "Any AEs",
179
+
var = "AEDECOD", soc = "AEBODSYS"
180
+
) |>
181
+
define_parameter(
182
+
name = "drug-related",
183
+
subset = toupper(AREL) == "RELATED",
184
+
label = "Drug-related AEs",
185
+
var = "AEDECOD", soc = "AEBODSYS"
186
+
) |>
187
+
meta_build()
188
+
```
189
+
190
+
## Step 2: adjusting column widths
191
+
192
+
In this example, we adjust the column widths to accommodate the long treatment labels and multiple treatment arms. To ensure sufficient space for the legend, the `width_fig` is set to a larger value and the `footer_space` is increased.
0 commit comments