Skip to content

Commit

Permalink
Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
walkowif committed Sep 26, 2023
1 parent 4e3f006 commit c97304f
Showing 1 changed file with 0 additions and 81 deletions.
81 changes: 0 additions & 81 deletions book/tables/pharmacokinetic/pkpt07.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,87 +22,6 @@ adpp <- synthetic_cdisc_dataset("latest", "adpp")
adpp <- adpp %>% filter(AVISIT == "CYCLE 1 DAY 1", str_detect(tolower(PARAM), regex("norm by dose", ignore_case = TRUE)))
```

## Standard Table -- Urine

```{r}
# lyt creation
lyt <- basic_table() %>%
split_rows_by(
var = "ARMCD",
split_fun = trim_levels_in_group("ARMCD"),
label_pos = "topleft",
split_label = "Treatment Arm"
) %>%
split_rows_by(
var = "PKPARAM",
label_pos = "topleft",
split_label = "PK Parameter",
child_labels = "hidden"
) %>%
analyze_vars_in_cols(
vars = "AVAL",
.stats = c(
"n", "mean", "sd", "cv",
"geom_mean", "geom_cv", "median",
"min", "max"
),
.labels = c(
n = "n",
mean = "Mean",
sd = "SD",
cv = "CV (%)",
geom_mean = "Geometric Mean",
geom_cv = "CV % Geometric Mean",
median = "Median",
min = "Minimum",
max = "Maximum"
),
.formats = c(
n = "xx.",
mean = format_sigfig(3),
sd = format_sigfig(3),
cv = "xx.x",
median = format_sigfig(3),
geom_mean = format_sigfig(3),
geom_cv = "xx.x",
min = format_sigfig(3),
max = format_sigfig(3)
)
)
```

#### Plasma Drug X

```{r variant1, test = list(result_v1 = "result")}
adpp0 <- adpp %>%
filter(PPCAT == "Plasma Drug X") %>%
h_pkparam_sort() %>%
mutate(PKPARAM = factor(paste0(TLG_DISPLAY, " (", AVALU, ")"))) %>%
mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))
result <- build_table(lyt, df = adpp0)
main_title(result) <- paste("Summary of", unique(adpp0$PPSPEC), "PK Parameter by Treatment Arm, PK Population")
subtitles(result) <- paste("Analyte:", unique(adpp0$PPCAT), "\nVisit:", unique(adpp0$AVISIT))
result
```

#### Plasma Drug Y

```{r variant2, test = list(result_v2 = "result")}
adpp1 <- adpp %>%
filter(PPCAT == "Plasma Drug Y") %>%
h_pkparam_sort() %>%
mutate(PKPARAM = factor(paste0(TLG_DISPLAY, " (", AVALU, ")"))) %>%
mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))
result <- build_table(lyt, df = adpp1)
main_title(result) <- paste("Summary of", unique(adpp1$PPSPEC), "PK Parameter by Treatment Arm, PK Population")
subtitles(result) <- paste("Analyte:", unique(adpp1$PPCAT), "\nVisit:", unique(adpp1$AVISIT))
result
```

{{< include ../../test-utils/save_results.qmd >}}

## `teal` App

```{r teal, message=FALSE, opts.label='skip_if_testing'}
Expand Down

0 comments on commit c97304f

Please sign in to comment.