Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidying tlf-demographic.Rmd removing {pilot1wrappers} package dependency. #178

Merged
merged 5 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions vignettes/tlf-demographic.Rmd
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
title: "CDISC Pilot: Summary of Demographic and Baseline Characteristics"
title: 'CDISC Pilot: Summary of Demographic and Baseline Characteristics'
output:
pdf_document:
toc: yes
toc_depth: '2'
html_document:
df_print: paged
toc: yes
toc_depth: '2'
toc_float: true
toc_float: yes
---

The Pilot 1 Team generated the below output using R and it was delivered to the FDA. You can find the source code that generated this output [here](https://github.com/RConsortium/submissions-pilot1/blob/main/vignettes/tlf-demographic.Rmd) and a deeper dive of the process [here](https://rconsortium.github.io/submissions-pilot1/articles/tlf-demographic.html). We delivered the identical output with the R generated ADaM.
Expand All @@ -30,9 +33,6 @@ if (file.access(".", 2) != 0) {
library(haven)
library(dplyr)
library(rtables)

# Propitiatory Package, please refer appendix of ADRG to install
library(pilot1wrappers)
```


Expand Down
15 changes: 6 additions & 9 deletions vignettes/tlf-efficacy.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ library(dplyr)
library(haven)
library(r2rtf)
library(emmeans)

# Propitiatory Package, please refer appendix of ADRG to install
library(pilot1wrappers)
```

```{r, message = FALSE, echo = FALSE}
Expand Down Expand Up @@ -87,12 +84,12 @@ apr0ancova1 <- merge(t10, t11) %>%
mutate(
Trt = c("Xanomeline High Dose", "Placebo"),
N1 = N,
Mean1 = pilot1wrappers::fmt_est(mean_bl, sd_bl),
Mean1 = pilot3utils::fmt_est(mean_bl, sd_bl),
N2 = N_20,
Mean2 = pilot1wrappers::fmt_est(mean, sd),
Mean2 = pilot3utils::fmt_est(mean, sd),
N3 = N_20,
Mean3 = pilot1wrappers::fmt_est(mean_chg, sd_chg),
CI = pilot1wrappers::fmt_ci(emmean, lower.CL, upper.CL)
Mean3 = pilot3utils::fmt_est(mean_chg, sd_chg),
CI = pilot3utils::fmt_ci(emmean, lower.CL, upper.CL)
) %>%
select(Trt:CI)

Expand All @@ -110,8 +107,8 @@ apr0ancova2 <- t2 %>%
) %>%
mutate(
comp = "Xanomeline High Dose vs. Placebo",
mean = pilot1wrappers::fmt_ci(estimate, lower, upper),
p = pilot1wrappers::fmt_pval(p.value)
mean = pilot3utils::fmt_ci(estimate, lower, upper),
p = pilot3utils::fmt_pval(p.value)
) %>%
select(comp:p)

Expand Down
Loading