Skip to content

Commit

Permalink
Run styler #90 #91
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyad committed Mar 28, 2024
1 parent ad70b62 commit ed660c4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions data-raw/pc.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,24 @@ PC$PCTPTNUM <- PC$t

## PCTPT ----
PC$PCTPT <- ifelse(PC$PCTPTNUM == -0.5, "Pre-dose",
ifelse(PC$PCTPTNUM == 0.08, "5 Min Post-dose",
ifelse(PC$PCTPTNUM == 0.5, "30 Min Post-dose", paste0(PC$PCTPTNUM, "h Post-dose"))))
ifelse(PC$PCTPTNUM == 0.08, "5 Min Post-dose",
ifelse(PC$PCTPTNUM == 0.5, "30 Min Post-dose", paste0(PC$PCTPTNUM, "h Post-dose"))
)
)


PC_Urine <- PC %>%
filter(PCTPTNUM %in% c(6.00, 12.00, 24.00, 48.00)) %>%
mutate(PCSPEC = "URINE",
PCTPT = case_when(PCTPT == "6h Post-dose" ~ "0-6h Post-dose",
PCTPT == "12h Post-dose" ~ "6-12h Post-dose",
PCTPT == "24h Post-dose" ~ "12-24h Post-dose",
PCTPT == "48h Post-dose" ~ "24-48h Post-dose"),
Conc = Urine)
mutate(
PCSPEC = "URINE",
PCTPT = case_when(
PCTPT == "6h Post-dose" ~ "0-6h Post-dose",
PCTPT == "12h Post-dose" ~ "6-12h Post-dose",
PCTPT == "24h Post-dose" ~ "12-24h Post-dose",
PCTPT == "48h Post-dose" ~ "24-48h Post-dose"
),
Conc = Urine
)

PC <- bind_rows(PC, PC_Urine)

Expand Down
2 changes: 1 addition & 1 deletion data-raw/pp.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pp_Ae <- pc1u %>%
# CLR
pp_AUC_sub <- subset(pp_AUC, select = c("STUDYID", "DOMAIN", "USUBJID", "PPCAT", "AUC"))
pp_CLR <- merge(pp_Ae, pp_AUC_sub, by = c("STUDYID", "DOMAIN", "USUBJID", "PPCAT")) %>%
mutate(pp_CLR = pp_Ae / AUC * 1000 / 60 ) %>%
mutate(pp_CLR = pp_Ae / AUC * 1000 / 60) %>%
glimpse()

## Add all require variables -----
Expand Down

0 comments on commit ed660c4

Please sign in to comment.