Skip to content

Commit be8b2fb

Browse files
rossfarrugiaNavitasLifeSciencesmanciniedoardoStefanThoma
authored
closes #143 Navitas R blog (#150)
* #143 draft blog * #143 spelling * Update posts/2024-04-15_de-_mystifying__.../de-_mystifying__r__programming_in__clinical__trials.qmd Co-authored-by: Edoardo Mancini <[email protected]> * Update de-_mystifying__r__programming_in__clinical__trials.qmd --------- Co-authored-by: NavitasLifeSciences <[email protected]> Co-authored-by: Edoardo Mancini <[email protected]> Co-authored-by: StefanThoma <[email protected]>
1 parent 3fc50e1 commit be8b2fb

File tree

6 files changed

+260
-0
lines changed

6 files changed

+260
-0
lines changed

inst/WORDLIST.txt

+9
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ atoxgr
8787
auth
8888
AVAL
8989
AVALU
90+
Balu
9091
basel
9192
bayer
9293
bb
@@ -102,6 +103,7 @@ bindEvent
102103
Biostatisticians
103104
Biostatistics
104105
Biostats
106+
Biotechs
105107
blogpost
106108
bmi
107109
BMI
@@ -166,6 +168,7 @@ datetime
166168
Datetime
167169
dcf
168170
DCUTDT
171+
De
169172
defaultPageSize
170173
deliverables
171174
DEMOADY
@@ -201,6 +204,7 @@ DTHFL
201204
dtm
202205
DTM
203206
dy
207+
EBGM
204208
eclinical
205209
eCTD
206210
edoardo
@@ -216,6 +220,7 @@ envsetup
216220
EOSDT
217221
EPI
218222
eps
223+
eSubmission
219224
ethz
220225
eval
221226
eventID
@@ -354,6 +359,7 @@ modularize
354359
Mosteller
355360
msrc
356361
na
362+
Navitas
357363
nas
358364
natively
359365
ncol
@@ -482,6 +488,7 @@ Siggaard
482488
signif
483489
siloed
484490
SITEIDN
491+
skillsets
485492
soumitra
486493
Soumitra
487494
ss
@@ -564,6 +571,7 @@ vehIoJgdA
564571
Velásquez's
565572
venkatachalam
566573
Venkatachalam
574+
Venkatesan
567575
Veríssimo
568576
ViiV
569577
Viyash
@@ -587,6 +595,7 @@ webr
587595
webR
588596
WebR
589597
wfk
598+
WG
590599
wg
591600
wikipedia
592601
WnpvVgmyE
Loading
50.9 KB
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# markdown helpers --------------------------------------------------------
2+
3+
markdown_appendix <- function(name, content) {
4+
paste(paste("##", name, "{.appendix}"), " ", content, sep = "\n")
5+
}
6+
markdown_link <- function(text, path) {
7+
paste0("[", text, "](", path, ")")
8+
}
9+
10+
11+
12+
# worker functions --------------------------------------------------------
13+
14+
insert_source <- function(repo_spec, name,
15+
collection = "posts",
16+
branch = "main",
17+
host = "https://github.com",
18+
text = "source code") {
19+
path <- paste(
20+
host,
21+
repo_spec,
22+
"tree",
23+
branch,
24+
collection,
25+
name,
26+
"code_sections.qmd",
27+
sep = "/"
28+
)
29+
return(markdown_link(text, path))
30+
}
31+
32+
insert_timestamp <- function(tzone = Sys.timezone()) {
33+
time <- lubridate::now(tzone = tzone)
34+
stamp <- as.character(time, tz = tzone, usetz = TRUE)
35+
return(stamp)
36+
}
37+
38+
insert_lockfile <- function(repo_spec, name,
39+
collection = "posts",
40+
branch = "main",
41+
host = "https://github.com",
42+
text = "R environment") {
43+
path <- paste(
44+
host,
45+
repo_spec,
46+
"tree",
47+
branch,
48+
collection,
49+
name,
50+
"renv.lock",
51+
sep = "/"
52+
)
53+
return(markdown_link(text, path))
54+
}
55+
56+
57+
58+
# top level function ------------------------------------------------------
59+
60+
insert_appendix <- function(repo_spec, name, collection = "posts") {
61+
appendices <- paste(
62+
markdown_appendix(
63+
name = "Last updated",
64+
content = insert_timestamp()
65+
),
66+
" ",
67+
markdown_appendix(
68+
name = "Details",
69+
content = paste(
70+
insert_source(repo_spec, name, collection),
71+
insert_lockfile(repo_spec, name, collection),
72+
sep = ", "
73+
)
74+
),
75+
sep = "\n"
76+
)
77+
knitr::asis_output(appendices)
78+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
---
2+
title: "De-Mystifying R Programming in Clinical Trials"
3+
author:
4+
- name: Venkatesan Balu
5+
description: "A blog highlighting the benefits/limitations of using R Programming and using the right tools to create value"
6+
date: "2024-04-15"
7+
categories: [community]
8+
image: "Rlogo.png"
9+
editor:
10+
markdown:
11+
wrap: 72
12+
---
13+
14+
<!--------------- typical setup ----------------->
15+
16+
```{r setup, include=FALSE}
17+
long_slug <- "2024-04-15_de-_mystifying__..."
18+
# renv::use(lockfile = "renv.lock")
19+
```
20+
21+
<!--------------- post begins here ----------------->
22+
23+
## Introduction
24+
25+
The use of R programming in clinical trials has not always been the most
26+
popular and obvious in the past. Despite experiencing significant growth
27+
in recent years, the adoption of R programming in clinical trials is not
28+
as widespread and evident as anticipated. Practical implementation faces
29+
obstacles due to various factors, including occasional
30+
misunderstandings, particularly in the context of validation, and a
31+
notable lack of awareness regarding its capabilities. However, despite
32+
these challenges, R is steadily establishing a growing presence within the
33+
pharmaceutical industry.
34+
35+
## Opportunities for R Programming in Clinical Trials
36+
37+
Although R is versatile and applicable in various settings, it is
38+
commonly associated with scientific computing and statistics. In the
39+
context of clinical trials, where researchers aim to understand and
40+
enhance drug development and testing processes, R has become a prominent
41+
tool for analyzing the collected data. While SAS® has been a
42+
longstanding programming language for clinical trials, the industry has
43+
been exploring alternative options. There is a quest for sustainable
44+
technology and tools that can effectively address industry challenges.
45+
46+
To drive innovation, there is a need to move away from traditional,
47+
inefficient processes and tools toward solutions that are efficient,
48+
simple, easy to implement, reliable, and cost-effective. Collaboration
49+
among industry stakeholders is crucial to develop a robust technology
50+
ecosystem and establish consensus on validation and regulatory
51+
benchmarks. Equally vital is preparing the workforce with the necessary
52+
skillsets to meet future demands.
53+
54+
## Current Usage Trends of R
55+
56+
Analyzing the current trends of R in the pharmaceutical industry reveals
57+
that its usage still has room for growth when related to Pharma
58+
Regulatory Submissions. However, R finds extensive use in public health
59+
projects, healthcare economics, exploratory and scientific analysis,
60+
trend identification, generating plots/graphs, specific statistical
61+
analysis, and machine learning. R continues to advance steadily in
62+
clinical trials, however lacks widespread usage within the clinical
63+
space.
64+
65+
This is an area that we see gradually evolving thanks to a number of
66+
across-industry efforts such as pharmaverse.
67+
68+
## SAS® or R Programming: Which is Better?
69+
70+
![SAS® or R?](Signpost.jpg){fig-align="center" width="500px"}
71+
72+
The ongoing debate in the programming community revolves around whether
73+
to replace SAS® with R, use both, or explore other alternatives like
74+
Python. Instead of adopting an either-or scenario, leveraging the
75+
strengths of each programming language for specific Data Science
76+
problems is recommended, recognizing that one size does not fit all.
77+
Despite the challenges early adopters of R have faced in regulatory compliance,
78+
there have been notable successes that highlight the benefits and potential of
79+
using R in regulated industries.
80+
Early adopters of R have faced challenges, with regulatory compliance
81+
for R packages being a common issue.
82+
83+
For R to be considered for tasks related to regulatory submission, a
84+
rigorous risk assessment of R packages, feasibility analysis, and the
85+
establishment of processes for R usage through pilot projects with
86+
necessary documentation becomes imperative. We see great progress in
87+
this area through efforts such as the [R Consortium R Submissions
88+
WG](https://rconsortium.github.io/submissions-wg/).
89+
90+
## Benefits of Using R Programming
91+
92+
R, as a language and environment for statistical computing and graphics,
93+
possesses characteristics that make it a potentially powerful tool for
94+
Data Analysis. With approximately 2 million users worldwide and three
95+
decades of legacy, R stands out as open-source software receiving
96+
substantial support from the community. Its availability under the GNU
97+
General Public License and extensive documentation contribute to its
98+
strength. R is versatile, running on various platforms, offering a wide
99+
array of statistical and graphical techniques, and its ease of producing
100+
publication-quality plots enhances its appeal.
101+
102+
The pharmaceutical industry has witnessed the emergence of various R
103+
packages tailored for Clinical Trial reporting. Examples include
104+
`{rtables}` for creating tables for reporting clinical trials,
105+
`{admiral}` for CDISC ADaM, `{pkglite}` to support eSubmission, and many
106+
others. Pharmaverse packages cater to different aspects of clinical trial data
107+
analysis, showcasing the versatility of R in this domain.
108+
109+
This article talks more about use of R in clinical trials and how this
110+
will be used by taking advantages of open source of R. The FDA
111+
emphasizes the need for fully documenting software packages used for
112+
statistical analysis in submissions. The use of R poses specific
113+
challenges related to validation, given its free and open-source nature.
114+
To address this, the [R Validation Hub](https://www.pharmar.org/) has
115+
released guidance documents focusing in this space.
116+
117+
Given that the cost of the R package is non-chargeable, it can also
118+
serve as a potential tool for API integration. For instance, in signal
119+
detection, R packages can prove to be valuable tools due to the
120+
intricate derivation process for EBGM in the Bayesian approach, which
121+
aims to mitigate false positive signals resulting from multiple
122+
comparisons. The computation adjusts the observed-to-expected reporting
123+
ratio for temporal trends and confounding variables such as age and sex.
124+
While both methods can estimate this, the accessibility of R as free
125+
software enables easy integration into any system as an API or for macro
126+
estimation purposes without any copyrights issue. As always though
127+
consult the license of any package being used to be sure your usage is
128+
in compliance.
129+
130+
## Identifying the Limitations in Using R Programming
131+
132+
It is crucial to note that software cost is essential to any company,
133+
including Pharma and Biotechs. While R and RStudio® are free and SAS®
134+
requires an annual license, using R instead of SAS® may not always lower
135+
costs. The cost of software is only one part of the equation. To be used
136+
in a highly regulated industry such as pharmaceuticals, software
137+
validation, maintenance, and support are critical, and their costs need
138+
to be considered. Although R is free and open source, it comes with a
139+
learning curve, and in short term the industry might face a shortage of
140+
experienced pharma R programmers compared to those familiar with SAS®.
141+
142+
## Leveraging the Right Tools to Capture Value
143+
144+
Capturing the value of R programming starts with a clear vision for its
145+
use and a systematic approach to identifying and prioritizing the needs
146+
in the industry. Clinical Data Science is evolving rapidly, and the
147+
industry actively seeks alternative solutions to unlock valuable
148+
insights from diverse datasets. Recognizing the need for innovation,
149+
collaboration, and efficient tools is crucial. Rather than viewing SAS®,
150+
R, and Python as mutually exclusive, leveraging the strengths of each
151+
for appropriate Data Science problems provides a nuanced and effective
152+
approach.
153+
154+
Ensuring data quality, scientific integrity, and regulatory compliance
155+
through risk assessment frameworks, validation, and documentation are
156+
imperative in this dynamic landscape. Pharmaverse is also actively steering
157+
the pharmaceutical industry's path by pioneering connections and advocating
158+
for R, thus exemplifying the broader trend of industries acknowledging the
159+
value and potential of open-source tools in tackling complex challenges.
160+
161+
![Leveraging the Right Tools](RightTool.png){fig-align="center"}
162+
163+
164+
165+
<!--------------- appendices go here ----------------->
166+
167+
```{r, echo=FALSE}
168+
source("appendix.R")
169+
insert_appendix(
170+
repo_spec = "pharmaverse/blog",
171+
name = long_slug
172+
)
173+
```

0 commit comments

Comments
 (0)