Skip to content

Commit

Permalink
put table first (#266)
Browse files Browse the repository at this point in the history
an attempt to fix
#265

currently one table only but if this is ok I can go for other tables as
well

![Sep-20-2024
11-56-05](https://github.com/user-attachments/assets/9a18f7fe-be42-42d7-bf42-a121ed13f659)

Changes:
- move "Data Setup" at the very end of the tabset
- move "teal App" as a section below tabset
- move "Reproducibility" as a section below tabset
  - hide code in there
  - use `session_info::session_info()` for better readability
  • Loading branch information
pawelru authored Sep 23, 2024
1 parent e6380f6 commit 6762c02
Show file tree
Hide file tree
Showing 140 changed files with 1,197 additions and 1,088 deletions.
5 changes: 0 additions & 5 deletions book/_utils/shinylive.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ Global shinylive configuration is available in the `_quarto.yaml` file.
The performance is slighly worse and some of the features (e.g. downloading) might not work at all.
:::

<!--
we have to put some code upfront
- need to setup repos on r-universe - currently it's not possible to setup this elsewhere (e.g. shinylive config or chunk attribute)
-->

```{r shinylive-constructor, echo = FALSE, results = "asis", opts.label = "skip_if_testing"}
repo_url <- ifelse(identical(Sys.getenv("QUARTO_PROFILE"), "stable"), "https://insightsengineering.r-universe.dev", "https://pharmaverse.r-universe.dev")
options(webr_pkg_repos = c("r-universe" = repo_url, getOption("webr_pkg_repos")))
Expand Down
15 changes: 9 additions & 6 deletions book/graphs/efficacy/fstg01.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ subtitle: Subgroup Analysis of Best Overall Response
{{< include ../../_utils/envir_hook.qmd >}}

:::: {.panel-tabset}
## Data Setup

```{r setup, message = FALSE}
#| code-fold: show

```{r setup, echo = FALSE}
library(dplyr)
library(tern)
library(nestcolor)
Expand Down Expand Up @@ -229,6 +226,14 @@ height <- 5
{{< include ../../_utils/webr.qmd >}}
:::

## Data Setup

```{r setup}
#| code-fold: show
```

::::

{{< include ../../_utils/save_results.qmd >}}

## `teal` App
Expand Down Expand Up @@ -301,5 +306,3 @@ shinyApp(app$ui, app$server)
:::

{{< include ../../repro.qmd >}}

::::
15 changes: 9 additions & 6 deletions book/graphs/efficacy/fstg02.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ subtitle: Subgroup Analysis of Survival Duration
{{< include ../../_utils/envir_hook.qmd >}}

:::: {.panel-tabset}
## Data Setup

```{r setup, message = FALSE}
#| code-fold: show

```{r setup, echo = FALSE}
library(tern)
library(dplyr)
library(forcats)
Expand Down Expand Up @@ -197,6 +194,14 @@ plot_v3.width <- 8 # nolint: object_name.
{{< include ../../_utils/webr.qmd >}}
:::

## Data Setup

```{r setup}
#| code-fold: show
```

::::

{{< include ../../_utils/save_results.qmd >}}

## `teal` App
Expand Down Expand Up @@ -278,5 +283,3 @@ shinyApp(app$ui, app$server)
:::

{{< include ../../repro.qmd >}}

::::
15 changes: 9 additions & 6 deletions book/graphs/efficacy/kmg01.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ subtitle: Kaplan-Meier Plot
{{< include ../../_utils/envir_hook.qmd >}}

:::: {.panel-tabset}
## Data Setup

```{r setup, message = FALSE}
#| code-fold: show

```{r setup, echo = FALSE}
library(tern)
library(dplyr)
library(nestcolor)
Expand Down Expand Up @@ -168,6 +165,14 @@ height <- 6
```
:::

## Data Setup

```{r setup}
#| code-fold: show
```

::::

{{< include ../../_utils/save_results.qmd >}}

## `teal` App
Expand Down Expand Up @@ -239,5 +244,3 @@ shinyApp(app$ui, app$server)
:::

{{< include ../../repro.qmd >}}

::::
17 changes: 10 additions & 7 deletions book/graphs/efficacy/mmrmg01.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ subtitle: Plots for Mixed-Effect Model Repeated Measures Analysis
Given an MMRM fitted with `s_mmrm`, `g_mmrm_lsmeans` displays for each visit the adjusted means within group and/or difference in adjusted means between groups.
`g_mmrm_diagnostic` displays marginal residual plots for evaluating model fit.

:::: {.panel-tabset}
## Data Setup and <br/> Model Fitting

```{r setup, message = FALSE}
#| code-fold: show
:::: {.panel-tabset} and <br/> Model Fitting

```{r setup, echo = FALSE}
library(dplyr)
library(tern.mmrm)
library(nestcolor)
Expand Down Expand Up @@ -112,6 +109,14 @@ plot <- g_mmrm_diagnostic(mmrm_results, type = "q-q-residual")
plot
```

## Data Setup and <br/> Model Fitting

```{r setup}
#| code-fold: show
```

::::

{{< include ../../_utils/save_results.qmd >}}

## `teal` App
Expand Down Expand Up @@ -176,5 +181,3 @@ shinyApp(app$ui, app$server)
```

{{< include ../../repro.qmd >}}

::::
15 changes: 9 additions & 6 deletions book/graphs/efficacy/mmrmg02.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ subtitle: Forest Plot for Mixed-Effect Model Repeated Measures
{{< include ../../_utils/envir_hook.qmd >}}

:::: {.panel-tabset}
## Data Setup

```{r setup, message = FALSE}
#| code-fold: show

```{r setup, echo = FALSE}
library(dplyr)
library(tern.mmrm)
library(nestcolor)
Expand Down Expand Up @@ -134,8 +131,14 @@ width <- 15
height <- 4
```

{{< include ../../_utils/save_results.qmd >}}
## Data Setup

{{< include ../../repro.qmd >}}
```{r setup}
#| code-fold: show
```

::::

{{< include ../../_utils/save_results.qmd >}}

{{< include ../../repro.qmd >}}
19 changes: 7 additions & 12 deletions book/graphs/other/brg01.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ subtitle: Bar Chart
{{< include ../../_utils/envir_hook.qmd >}}

:::: {.panel-tabset}
## Data Setup

```{r setup, message = FALSE}
#| code-fold: show

```{r setup, echo = FALSE}
library(binom)
library(dplyr)
library(ggplot2)
Expand Down Expand Up @@ -368,16 +365,14 @@ plot
{{< include ../../_utils/webr.qmd >}}
:::

{{< include ../../_utils/save_results.qmd >}}

## `teal` App
## Data Setup

```{r teal, opts.label = c("skip_if_testing", "app")}
```{r setup}
#| code-fold: show
# In progress
```

{{< include ../../repro.qmd >}}

::::

{{< include ../../_utils/save_results.qmd >}}

{{< include ../../repro.qmd >}}
16 changes: 9 additions & 7 deletions book/graphs/other/bwg01.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ subtitle: Box Plot
{{< include ../../_utils/envir_hook.qmd >}}

:::: {.panel-tabset}
## Data Setup

```{r setup, message = FALSE}
#| code-fold: show

# generic code for all plots
```{r setup, echo = FALSE}
library(dplyr)
library(ggplot2)
library(nestcolor)
Expand Down Expand Up @@ -418,6 +414,14 @@ plot
{{< include ../../_utils/webr.qmd >}}
:::

## Data Setup

```{r setup}
#| code-fold: show
```

::::

{{< include ../../_utils/save_results.qmd >}}

## `teal` App
Expand Down Expand Up @@ -527,5 +531,3 @@ shinyApp(app$ui, app$server)
:::

{{< include ../../repro.qmd >}}

::::
15 changes: 9 additions & 6 deletions book/graphs/other/cig01.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ subtitle: Confidence Interval Plot
{{< include ../../_utils/envir_hook.qmd >}}

:::: {.panel-tabset}
## Data Setup

```{r setup, message = FALSE}
#| code-fold: show

```{r setup, echo = FALSE}
library(tern)
library(ggplot2)
library(dplyr)
Expand Down Expand Up @@ -199,6 +196,14 @@ table
{{< include ../../_utils/webr.qmd >}}
:::

## Data Setup

```{r setup}
#| code-fold: show
```

::::

{{< include ../../_utils/save_results.qmd >}}

## `teal` App
Expand Down Expand Up @@ -288,5 +293,3 @@ shinyApp(app$ui, app$server)
:::

{{< include ../../repro.qmd >}}

::::
15 changes: 9 additions & 6 deletions book/graphs/other/ippg01.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ subtitle: Individual Patient Plot Over Time
For illustration purposes, we will subset the `adlb` dataset for safety population in treatment arm A and a specific lab parameter (`ALT`).

:::: {.panel-tabset}
## Data Setup

```{r setup, message = FALSE}
#| code-fold: show

```{r setup, echo = FALSE}
library(tern)
library(dplyr)
library(ggplot2)
Expand Down Expand Up @@ -98,6 +95,14 @@ plots
{{< include ../../_utils/webr.qmd >}}
:::

## Data Setup

```{r setup}
#| code-fold: show
```

::::

{{< include ../../_utils/save_results.qmd >}}

## `teal` App
Expand Down Expand Up @@ -180,5 +185,3 @@ shinyApp(app$ui, app$server)
:::

{{< include ../../repro.qmd >}}

::::
19 changes: 7 additions & 12 deletions book/graphs/other/ltg01.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ subtitle: Lattice Plot of Laboratory Tests by Treatment Group Over Time
Lattice plots are natively handled by R, the examples below rely mostly on the package `ggplot2`.

:::: {.panel-tabset}
## Data Setup

```{r setup, message = FALSE}
#| code-fold: show

```{r setup, echo = FALSE}
library(tern)
library(teal.modules.clinical)
library(ggplot2)
Expand Down Expand Up @@ -266,16 +263,14 @@ plot
{{< include ../../_utils/webr.qmd >}}
:::

{{< include ../../_utils/save_results.qmd >}}

## `teal` App
## Data Setup

```{r teal, opts.label = c("skip_if_testing", "app")}
```{r setup}
#| code-fold: show
# In progress
```

{{< include ../../repro.qmd >}}

::::

{{< include ../../_utils/save_results.qmd >}}

{{< include ../../repro.qmd >}}
15 changes: 9 additions & 6 deletions book/graphs/other/mng01.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ subtitle: Mean Plot
{{< include ../../_utils/envir_hook.qmd >}}

:::: {.panel-tabset}
## Data Setup

```{r setup, message = FALSE}
#| code-fold: show

```{r setup, echo = FALSE}
library(dplyr)
library(tern)
library(nestcolor)
Expand Down Expand Up @@ -196,6 +193,14 @@ plot
{{< include ../../_utils/webr.qmd >}}
:::

## Data Setup

```{r setup}
#| code-fold: show
```

::::

{{< include ../../_utils/save_results.qmd >}}

## `teal` App
Expand Down Expand Up @@ -254,5 +259,3 @@ shinyApp(app$ui, app$server)
:::

{{< include ../../repro.qmd >}}

::::
Loading

0 comments on commit 6762c02

Please sign in to comment.