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
The true beauty of pharmaverse (and open source in general) is when efforts from
5
+
The true beauty of `pharmaverse` (and open source in general) is when efforts from
6
6
various different developers come together to complement each other as a whole
7
7
greater than the sum of the individual parts. By design in R, no single package
8
8
will ever completely cover all your needs, but by piecing them together we can
9
9
make complex tasks increasingly simple.
10
10
11
-
This book contains end-to-end examples of using pharmaverse packages together to
11
+
This book contains end-to-end examples of using `pharmaverse` packages together to
12
12
achieve common clinical reporting analyses, such as SDTM, ADaM, and
13
13
Tables/Listings/Graphs. The examples use consistent source test raw datasets from
14
14
`{pharmaverseraw}`, SDTMs from `{pharmaversesdtm}`, and ADaMs from
15
15
`{pharmaverseadam}` respectively.
16
16
17
-
::: {.callout-tip}
18
-
## Try it in the cloud
17
+
We'll endeavour to include a selection of examples here over time, e.g. to help
18
+
users when trying out the packages for PK/PD or Therapeutic Area specific
19
+
(such as Oncology or Vaccines) analyses.
20
+
21
+
Note that this examples book should only be used to show how collections of
22
+
packages can be used in conjunction - more thorough examples of individual
23
+
package usages would always be covered in the package site vignettes and no
24
+
need to repeat here.
25
+
26
+
## Running the examples
19
27
28
+
### Posit Cloud
29
+
30
+
::: {.callout-tip}
20
31
[Launch Posit Cloud](https://posit.cloud/content/7279124) to run any example
21
-
interactively without a local R installation. Open **File → Open File** and
22
-
choose whichever example script you'd like to explore.
32
+
interactively without a local R installation. Each example can be explored via a live and interactive Posit Cloud environment
33
+
(preconfigured with all required package installations).
34
+
35
+
You can do this by clicking **File → Open File** and then choosing whichever example script,
36
+
e.g. `adam/adsl.R`. Feel free to try out customizing any of the examples to better fit any of
37
+
your own internal clinical reporting workflows!
23
38
:::
24
39
40
+
### Locally
41
+
42
+
To run examples locally, download the [repository](https://github.com/pharmaverse/examples) and run the following in the R console inside the project folder to install dependencies:
43
+
44
+
```r
45
+
if(!require(pak)) {
46
+
install.packages("pak")
47
+
}
48
+
pak::pak()
49
+
```
50
+
51
+
*Note: the R scripts are generated from `.qmd` files automatically using [`knitr::purl`](https://bookdown.org/yihui/rmarkdown-cookbook/purl.html).*
52
+
25
53
---
26
54
27
55
## Getting Started
28
56
29
57
The examples are organized by the stage of the clinical data pipeline they cover.
30
-
If you're new to pharmaverse, working through them in order gives a natural end-to-end
58
+
If you're new to `pharmaverse`, working through them in order gives a natural end-to-end
31
59
view of how the ecosystem fits together.
32
60
33
61
| Section | What it covers | Good starting point if… |
|**[SDTM](sdtm/index.qmd)**| Converting raw collected data to CDISC SDTM domains | You work upstream of ADaM or want to understand the data origin |
36
-
|**[ADaM](adam/index.qmd)**| Building analysis datasets (ADSL, ADTTE, ADPC, etc.) from SDTM | You're implementing analysis-ready datasets for reporting |
64
+
|**[ADaM](adam/index.qmd)**| Building analysis datasets (`ADSL`, `ADTTE`, `ADPC`, etc.) from SDTM | You're implementing analysis-ready datasets for reporting |
37
65
|**[TLG](tlg/index.qmd)**| Creating tables, listings, and graphs for clinical study reports | You focus on outputs — demographics, AEs, survival, PK summaries |
38
66
39
-
If you're primarily interested in a specific output type, jump directly to the
40
-
[TLG section](tlg/index.qmd), which is self-contained and uses pre-built ADaM
41
-
datasets from `{pharmaverseadam}`.
42
-
43
67
The site also includes introductory examples for several additional workflow areas:
44
68
45
69
-**[Interactive](interactive/index.qmd)** — building clinical data exploration apps with `{teal}`
46
-
-**[Documents](documents/index.qmd)** — automated report generation from ADaM data
47
-
-**[Logs](logs/index.qmd)** — logging and traceability for clinical R workflows
70
+
-**[Documents](digit_files/index.qmd)** — automated report generation from ADaM data
71
+
-**[Logging](logging/index.qmd)** — logging and traceability for clinical R workflows
48
72
-**[eSub](esub/index.qmd)** — preparing outputs for electronic regulatory submission
49
73
50
74
---
@@ -57,39 +81,40 @@ documentation; the Example column links to where it is used on this site.
57
81
58
82
### Data Packages
59
83
84
+
:::{tbl-colwidths="[15,60,25]"}
60
85
| Package | Description | Example |
61
86
|---------|-------------|---------|
62
-
|[`{pharmaverseraw}`](https://pharmaverse.github.io/pharmaverseraw/)| Source raw datasets (AE, DM, EX, DS domains) used as the starting point for all SDTM examples |[SDTM](sdtm/index.qmd)|
63
-
|[`{pharmaversesdtm}`](https://pharmaverse.github.io/pharmaversesdtm/)| CDISC SDTM example datasets generated from `{pharmaverseraw}`|[SDTM](sdtm/index.qmd) / [ADaM](adam/index.qmd)|
64
-
|[`{pharmaverseadam}`](https://pharmaverse.github.io/pharmaverseadam/)| CDISC ADaM example datasets (ADSL, ADTTE, ADPC, etc.) used across TLG and PK examples |[TLG](tlg/index.qmd) / [PK](tlg/pharmacokinetic.qmd)|
65
-
66
-
### SDTM Packages
67
-
68
-
| Package | Description | Example |
69
-
|---------|-------------|---------|
87
+
|[`{pharmaverseraw}`](https://pharmaverse.github.io/pharmaverseraw/)| Source raw datasets (`AE`, `DM`, `EX`, `DS` domains) used as the starting point for all SDTM examples |[SDTM](sdtm/index.qmd)|
70
88
|[`{sdtm.oak}`](https://pharmaverse.github.io/sdtm.oak/)| SDTM programming in R — maps raw collected data to CDISC SDTM domains using an algorithm-based engine |[SDTM](sdtm/index.qmd)|
89
+
|[`{pharmaversesdtm}`](https://pharmaverse.github.io/pharmaversesdtm/)| CDISC SDTM example datasets generated from `{pharmaverseraw}`|[SDTM](sdtm/index.qmd) / [ADaM](adam/index.qmd)|
90
+
|[`{pharmaverseadam}`](https://pharmaverse.github.io/pharmaverseadam/)| CDISC ADaM example datasets (`ADSL`, `ADTTE`, `ADPC`, etc.) used across TLG and PK examples |[TLG](tlg/index.qmd) / [PK](tlg/pharmacokinetic.qmd)|
91
+
:::
71
92
72
93
### ADaM Packages
73
94
95
+
:::{tbl-colwidths="[15,60,25]"}
74
96
| Package | Description | Example |
75
97
|---------|-------------|---------|
76
-
|[`{admiral}`](https://pharmaverse.github.io/admiral/)| ADaM dataset construction in R — the core package for building ADSL, ADAE, ADTTE, and other standard domains |[ADaM](adam/index.qmd)|
98
+
|[`{admiral}`](https://pharmaverse.github.io/admiral/)| ADaM dataset construction in R — the core package for building `ADSL`, `ADAE`, `ADTTE`, and other standard domains |[ADaM](adam/index.qmd)|
77
99
|[`{admiralonco}`](https://pharmaverse.github.io/admiralonco/)| Oncology-specific ADaM extensions for `{admiral}` — adds functions for tumor response, DOR, and TTE oncology endpoints |[ADaM](adam/index.qmd)|
78
100
|[`{metacore}`](https://atorus-research.github.io/metacore/)| Stores and validates dataset metadata (variable definitions, codelists) from specs in a consistent R object |[ADaM](adam/index.qmd)|
79
101
|[`{metatools}`](https://pharmaverse.github.io/metatools/)| Utilities for working with `{metacore}` objects — checking variables, applying codelists, and deriving variables from metadata |[ADaM](adam/index.qmd)|
80
102
|[`{xportr}`](https://atorus-research.github.io/xportr/)| Applies SAS XPT metadata (types, labels, lengths, formats) and exports submission-ready `.xpt` transport files |[ADaM](adam/index.qmd)|
103
+
:::
81
104
82
105
### TLG Packages
83
106
107
+
:::{tbl-colwidths="[15,60,25]"}
84
108
| Package | Description | Example |
85
-
|---------|-------------|---------|
109
+
|-----------|-------------|---------|
86
110
|[`{rtables}`](https://insightsengineering.github.io/rtables/)| Framework for building complex nested tables with flexible layouts — the foundation of the NEST TLG stack |[Demographics](tlg/demographic.qmd) / [AE](tlg/adverse_events.qmd) / [PK](tlg/pharmacokinetic.qmd)|
87
111
|[`{tern}`](https://insightsengineering.github.io/tern/)| Analysis functions for clinical trial TLGs built on `{rtables}` — covers demographics, AEs, survival, PK summaries |[Demographics](tlg/demographic.qmd) / [AE](tlg/adverse_events.qmd) / [PK](tlg/pharmacokinetic.qmd)|
88
112
|[`{rlistings}`](https://insightsengineering.github.io/rlistings/)| Creates regulatory-ready listings from ADaM datasets |[PK](tlg/pharmacokinetic.qmd)|
89
-
|[`{gtsummary}`](https://www.danieldsjoberg.com/gtsummary/)| Publication-ready summary and analytical tables — used here for survival median and time-point tables|[Oncology Survival](tlg/oncology_survival.qmd)|
90
-
|[`{ggsurvfit}`](https://www.danieldsjoberg.com/ggsurvfit/)| Publication-ready Kaplan-Meier and time-to-event figures built on `{ggplot2}`, with native CDISC ADTTE support via `Surv_CNSR()`|[Oncology Survival](tlg/oncology_survival.qmd)|
113
+
|[`{gtsummary}`](https://www.danieldsjoberg.com/gtsummary/)| Publication-ready summary and analytical tables — ideal for demographics and analysis summaries|[Demographics](tlg/demographic.qmd)|
114
+
|[`{ggsurvfit}`](https://www.danieldsjoberg.com/ggsurvfit/)| Publication-ready Kaplan-Meier and time-to-event figures built on `{ggplot2}`|[TLG](tlg/index.qmd)|
91
115
|[`{cards}`](https://insightsengineering.github.io/cards/)| Creates Analysis Results Datasets (ARDs) following the emerging CDISC Analysis Results Standard |[Demographics](tlg/demographic.qmd) / [AE](tlg/adverse_events.qmd)|
92
116
|[`{tfrmt}`](https://gsk-biostatistics.github.io/tfrmt/)| Transforms ARDs into publication-ready tables with precise formatting control — particularly suited to RTF regulatory outputs |[Demographics](tlg/demographic.qmd) / [AE](tlg/adverse_events.qmd)|
117
+
:::
93
118
94
119
---
95
120
@@ -102,7 +127,10 @@ how to structure and submit a new example. If you'd like to suggest an example
102
127
without writing the code yourself, open an issue and the team will review it for
103
128
the backlog.
104
129
130
+
You can see a list of current contributors via our [GitHub repo DESCRIPTION file](https://github.com/pharmaverse/examples/blob/main/DESCRIPTION).
131
+
105
132
While you're there, consider giving the packages you use a
106
133
[⭐ GitHub star](https://github.com/pharmaverse/examples) — it helps maintainers
107
-
demonstrate community adoption and keeps the ecosystem visible to new users.
134
+
demonstrate community adoption and keeps the ecosystem visible to new users.
135
+
While you're there, please also consider adding a star to the Examples GitHub repo!
0 commit comments