forked from elong0527/r4csr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preface.Rmd
95 lines (73 loc) · 4.73 KB
/
preface.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Preface {-}
## Folder structure {.unnumbered}
In clinical trial development, source code needs to be developed and maintained to generate and deliver
Study Data Tabulation Model (SDTM), Analysis Dataset Model (ADaM) datasets and tables, listings, and figures (TLFs).
A typical example is a Phase 3 clinical trial where hundreds of TLFs are required for submission.
Considering the number of programs required for such an effort,
a consistent and well-defined folder structure is crucial in
managing a clinical trial analysis and reporting (A&R) project.
We recommend using the
[R package folder structure](https://github.com/rstudio/cheatsheets/raw/master/package-development.pdf)
to organize all the A&R-related source code and documentation for a clinical trial A&R project.
The R package folder structure is well defined and widely used in the R community through repositories (e.g., CRAN).
The consistent approach of using the R package folder structure
simplifies the communication for all developers within and across organizations.
- For a new R developer, it is an essential step to develop R packages
when you want to share your work with others.
You will learn one folder structure widely used in the R community
with outstanding tutorials and tools for free.
- For an experienced R developer, there is a minimal learning curve.
- For an organization, it simplifies the process, tool, template,
and training development, because a unified folder structure is used
to develop and maintain standard tool and analysis projects.
The workflow around an R package can also improve
the traceability and reproducibility of an analysis project [@marwick2018packaging].
We will revisit folder structure when we discuss project management for a clinical trial project.
In addition, R package folder structure is also recommended
to develop Shiny apps as discussed
in Chapter 20 of the [Mastering Shiny](https://mastering-shiny.org/scaling-packaging.html) book
and the [Engineering Production-Grade Shiny Apps](https://engineering-shiny.org/golem.html) book.
## In this book {.unnumbered}
This book is an intermediate-level book by
assuming readers have R programming and clinical development knowledge.
The assumption of each part is as below:
- Part 1, "Delivering TLFs in CSR" provides general information with examples
to create tables, listings, and figures.
In this part, we assume readers are individual contributors to a clinical project
with some experience in R programming.
We expect readers are familiar with data manipulation in R.
Some good references include [Hands-On Programming with R](https://rstudio-education.github.io/hopr/),
[R for Data Science](https://r4ds.had.co.nz/) and
[Data Manipulation with R](https://www.amazon.com/Data-Manipulation-R-Use/dp/0387747303).
- Part 2, "Clinical trial project" provides general information
with examples to manage a clinical trial A&R project.
In this part, we assume a reader is a project lead with experience in R package development.
Some good references include [R Packages](https://r-pkgs.org/) and the
[tidyverse style guide](https://style.tidyverse.org/).
- Part 3, "eCTD submission package" provides general information in preparing
submission packages related to clinical study report (CSR) in
electronic Common Technical Document (eCTD).
In this part, we assume a reader is a project lead of a clinical project
with experience in R package development and submission.
## Philosophy {.unnumbered}
We share the same philosophy described in
Section 1.1 of the [R Packages](https://r-pkgs.org/intro.html#intro-phil) book
and quote here.
- "Anything that can be automated, should be automated."
- "Do as little as possible by hand. Do as much as possible with functions."
- "The goal is to spend your time thinking about what you want to do
rather than thinking about the minutiae of the package structure."
## Authors and contributors {.unnumbered}
The document is maintained by a community.
While reading the document, you can be a contributor as well.
The quality of this document relies on you.
- Authors: contributed the majority of content to at least one chapter.
Yilong Zhang <<[email protected]>>, Nan Xiao, Keaven Anderson, Yalin Zhu
- Contributors: contributed at least one commit to the [source code](https://github.com/elong0527/r4csr).
```{r, results = "asis", echo = FALSE, message = FALSE}
contributors <- read.csv("contributors.csv", stringsAsFactors = FALSE, na.strings = "")
contributors$desc <- with(contributors, ifelse(is.na(username), trimws(name), paste0(trimws(name), " (\\@", trimws(username), ")")))
cat(" We are grateful for all the improvements brought by these contributors (in chronological order): ", sep = "")
cat(paste0(contributors$desc, collapse = ", "))
cat(".\n")
```