Skip to content

Commit 3cf6af0

Browse files
committed
additional revisions to ADRG for content and PDF format issues
1 parent 4bff239 commit 3cf6af0

File tree

1 file changed

+37
-19
lines changed

1 file changed

+37
-19
lines changed

adrg/_adrg.qmd

+37-19
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Number of Subjects Planned:
6161

6262
Study schema:
6363

64-
![](figures/study_design.png)
64+
![](figures/study_design.png){width="90%"}
6565

6666
# Analysis Considerations Related to Multiple Analysis Datasets
6767

@@ -99,7 +99,7 @@ Core variables are those that are represented across all/most analysis datasets.
9999

100100
## Imputation/Derivation Methods
101101

102-
Not applicable
102+
Not applicable.
103103

104104
# Analysis Data Creation and Processing Issues
105105

@@ -153,7 +153,7 @@ kable_styling(df_kbl, font_size = 10)
153153
```{r}
154154
#| label: table-datasets-pdf
155155
#| echo: false
156-
kable_styling(df_kbl, latex_options = c("scale_down")) %>%
156+
kable_styling(df_kbl, latex_options = c("scale_down", "hold_position")) %>%
157157
column_spec(1, border_left = TRUE, border_right = TRUE, latex_valign = "m") %>%
158158
column_spec(2, width = "10em", border_left = TRUE, border_right = TRUE, latex_valign = "m") %>%
159159
column_spec(3, width = "10em", border_left = TRUE, border_right = TRUE, latex_valign = "m") %>%
@@ -266,15 +266,15 @@ issue_df_kbl %>%
266266

267267
## Description
268268

269-
The sponsor has provided all programs for analysis results. They are all created on a Linux platform using R version 4.1.2.
269+
The sponsor has provided all programs for analysis results. They are all created on a Linux platform using R version 4.4.1.
270270

271271
## ADaM Programs
272272

273273
Not Applicable. This pilot project only submits programs for analysis results.
274274

275-
## Analysis Output Programs
275+
## Analysis Output Programs {#sec-analysisoutput}
276276

277-
The Shiny application included in this pilot follows a different structure than a traditional collection of analysis programs such as those included in the Pilot 1 eCTD transfer. In addition, the framework used for assembling the Shiny application modules is different than the framework used in the Pilot 2 eCTD transer. The application is developed with a modular approach and assembled with the [`rhino`](https://appsilon.github.io/rhino/) R package for enhanced code organization. At the time of this submission, the [`golem`](https://thinkr-open.github.io/golem/) R package (used by Pilot 2) is not supported by [`webR`](https://docs.r-wasm.org/webr/latest/). A description of the primary scripts used within the application is given in the table below.
277+
The Shiny application included in this pilot follows a different structure than a traditional collection of analysis programs such as those included in the Pilot 1 eCTD transfer. In addition, the framework used for assembling the Shiny application modules is different than the framework used in the Pilot 2 eCTD transfer. The application is developed with a modular approach and assembled with the [`rhino`](https://appsilon.github.io/rhino/) R package for enhanced code organization. At the time of this submission, the [`golem`](https://thinkr-open.github.io/golem/) R package (used by Pilot 2) is not supported by [`webR`](https://docs.r-wasm.org/webr/latest/). A description of the primary scripts used within the application is given in the table below.
278278

279279
```{r}
280280
#| label: pilot4-programs
@@ -311,7 +311,7 @@ pilot4_programs_df_kbl %>%
311311

312312
## Application Execution Functions
313313

314-
An additional set of R functions are included in the `utils.R` script to support creating and executing the web-assembly version of the application. Descriptions of the key functions are included in the table below. The recommended steps to execute the Shiny application with these functions are outlined in Appendix 1.
314+
An additional set of R functions are included in the `utils.R` script to support creating and executing the web-assembly version of the application. Descriptions of the key functions are included in the table below. The recommended steps to execute the Shiny application with these functions (along with preparing your environment for evaluating the application) are outlined in @sec-a1.
315315

316316
```{r}
317317
#| label: pilot4-support-functions
@@ -375,7 +375,7 @@ kbl(
375375

376376
## List of Output Programs
377377

378-
Not Applicable. This pilot project displays analysis output as a Shiny application where the R programs described in the **Analysis Output Programs** as a whole produce the Shiny application.
378+
Not Applicable. This pilot project displays analysis output as a Shiny application where the R programs described in **Analysis Output Programs** (@sec-analysisoutput) as a whole produce the Shiny application.
379379

380380
# Directory Structure
381381

@@ -410,7 +410,7 @@ dir_df <- tibble::tibble(
410410
desc = c("Refers to the eCTD module in which clinical study data is being submitted.", "Resides within the module folder as the top-level folder for clinical study data being submitted for m5.", "Study identifier or analysis type performed", "Contains folders for analysis datasets and software programs; arrange in designated level 6 subfolders", "Contains subfolders for ADaM datasets and corresponding software programs", "Contains ADaM datasets, analysis data reviewer’s guide, analysis results metadata and define files", "Contains Shiny application source files bundled as a zip archive")
411411
)
412412
413-
kbl(
413+
dir_df_kbl <- kbl(
414414
dir_df,
415415
col.names = c("Directory", "Index", "Description")
416416
) %>%
@@ -420,6 +420,24 @@ kbl(
420420
column_spec(3, width = "30em")
421421
```
422422

423+
::: {.content-visible when-format="html"}
424+
```{r}
425+
dir_df_kbl %>%
426+
kable_styling()
427+
```
428+
:::
429+
430+
::: {.content-visible when-format="pdf"}
431+
```{r}
432+
dir_df_kbl %>%
433+
kable_styling(latex_options = c("scale_down", "hold_position")) %>%
434+
column_spec(1, width = "10em") %>%
435+
column_spec(2, width = "3em") %>%
436+
column_spec(3, width = "30em")
437+
```
438+
:::
439+
440+
423441
The R scripts and supporting files for the Shiny application are contained in the `r4app.zip` archive with the following structure (the output below has been truncated for brevity):
424442

425443
r4app
@@ -447,8 +465,6 @@ The R scripts and supporting files for the Shiny application are contained in th
447465

448466
To install and execute the Shiny application, follow all of the procedures below. Ensure that you note the location of where you downloaded the Pilot 4 eCTD submission files. For demonstration purposes, the procedures below assume the transfer has been saved to this location: `C:\pilot4`.
449467

450-
In addition, create a new directory to hold the unpacked Pilot 4 Shiny application files. For demonstration purposes, the procedures below assume the new directory is this location: `C:\pilot4_files`.
451-
452468
## Installation of R and RStudio
453469

454470
Download and install R 4.4.1 for Windows from <https://cran.r-project.org/bin/windows/base/R-4.4.1-win.exe>. While optional, it is also recommended to use RStudio IDE for executing R code to launch the application. You can download RStudio for Windows by visiting <https://posit.co/download/rstudio-desktop/#download>.
@@ -496,7 +512,13 @@ C:\pilot4\m5\datasets\rconsortiumpilot4\analysis\adam\programs\r4app.zip
496512

497513
## Initialize R Package Environment
498514

499-
The dependencies for executing the Shiny application are managed by the `renv` R package management system. To bootstrap the customized R package library used for the Shiny application, launch a new R session in the directory where you unpacked the application source files in the previous step. **Choose one of the following options** depending on your R computing environment and preference:
515+
The dependencies for executing the Shiny application are managed by the `renv` R package management system. To bootstrap the customized R package library used for the Shiny application, launch a new R session in the directory where you unpacked the application source files in the previous step. **Choose one of the following options** depending on your R computing environment and preference.
516+
517+
::: callout-note
518+
Due to certain R packages in the application requiring compilation, the entire package restoration procedure may require at least ten minutes or longer to complete depending on internet bandwidth and your computer's hardware profile.
519+
520+
The package library includes all packages required to execute the application in the traditional method, however executing the application in the web-assembly method requires a minimal set of packages. Additional details can be found in @sec-launch .
521+
:::
500522

501523
### Option 1: RStudio {.unnumbered}
502524

@@ -511,10 +533,6 @@ RStudio will refresh the window and automatically install the `renv` package int
511533
renv::restore(prompt = FALSE)
512534
```
513535

514-
::: callout-note
515-
Due to certain R packages in the application requiring compilation, the entire package restoration procedure may require at least ten minutes or longer to complete depending on internet bandwidth and your computer's hardware profile.
516-
:::
517-
518536
Once the package installation process is complete, run the following code to load a set of functions utilized in the remaining steps:
519537

520538
```r
@@ -558,7 +576,7 @@ renv::restore(prompt = FALSE)
558576
Due to certain R packages in the application requiring compilation, the entire package restoration procedure may require at least ten minutes or longer to complete depending on internet bandwidth and your computer's hardware profile.
559577
:::
560578
561-
Once the package installation process is complete, run the following code to load a set of functions utilized in the remaining steps:
579+
Once the package installation process is complete, you may see a message in the R console stating a new version of the `BiocManager` has been installed and to restart the R session to use that new version. This package is not utilized in the Pilot application, and you do not need to restart your R session. Next, run the following code to load a set of functions utilized in the remaining steps:
562580
563581
```r
564582
source("utils.R")
@@ -584,7 +602,7 @@ The second method involves compiling the application in your R environment. Run
584602
build_app()
585603
```
586604
587-
## Launch Shiny Application
605+
## Launch Shiny Application {#sec-launch}
588606
589607
### Web-assembly Method
590608
@@ -594,7 +612,7 @@ The web-assembly version of the Shiny application can be launched with the follo
594612
run_app_webassembly()
595613
```
596614
597-
A message appears in the R console displaying the web address of the application. To view the application, launch a new web browser session in Microsoft Edge and paste the address in the address bar. By default, the address will be `localhost:7654`.
615+
A message appears in the R console displaying the web address of the application. To view the application, launch a new web browser session in Microsoft Edge and paste the address in the address bar. By default, the address will be `http://127.0.0.1:7654`.
598616
599617
::: callout-note
600618
If the `build_app()` function was used to compile the application files, you may encounter a slight delay as the web browser installs the R packages. When visiting the application in a future session, these package installations will be cached in your browser's local storage and will render in less time.

0 commit comments

Comments
 (0)