From 72e38dd56069ba58740d95d7b2fcbc2c62b3fba4 Mon Sep 17 00:00:00 2001 From: Zelos Zhu Date: Tue, 6 Aug 2024 14:31:26 +0000 Subject: [PATCH] order of operations? --- R/derive_params_growth_age.R | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/R/derive_params_growth_age.R b/R/derive_params_growth_age.R index 02656b5..06839df 100644 --- a/R/derive_params_growth_age.R +++ b/R/derive_params_growth_age.R @@ -329,6 +329,8 @@ derive_params_growth_age <- function(dataset, ) } + add_pctl <- add_pctl %>% mutate(AVAL = pnorm(temp_z) * 100) + if (bmi_cdc_correction) { add_pctl <- add_pctl %>% mutate( @@ -342,9 +344,6 @@ derive_params_growth_age <- function(dataset, AVAL = ifelse(AVAL == Inf, 8.21, AVAL) ) %>% select(-c(P95, Sigma)) - } else { - add_pctl <- add_pctl %>% - mutate(AVAL = pnorm(temp_z) * 100) } dataset_final <- bind_rows(dataset_final, add_pctl) %>%