Skip to content

Commit

Permalink
#32: Keep WHO data till day 730 included
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanny-Gautier committed May 7, 2024
1 parent 701c7b0 commit e7721d9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions inst/templates/ad_advs.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ library(stringr)


# Creation of the Growth metadata combining WHO and CDC
# Default reference sources: WHO for children <2 yrs old (<730 days),
# Default reference sources: WHO for children <2 yrs old (<=730 days),
# and CDC for children >=2 yrs old (>= 730.5 days)
# Load WHO and CDC metadata datasets ----

message("Please be aware that our default reference source is in our metadata :
message("Please be aware that our default reference source in our metadata is :
WHO for <2 yrs old children, and CDC for >=2 yrs old children.
The user could replace these metadata with their own chosen metadata")

Expand All @@ -31,10 +31,10 @@ data(WHO_bmi_for_age_girls)
data(cdc_bmiage)

bmi_for_age <- who_bmi_for_age_boys %>%
filter(Day <= 729) %>%
filter(Day <= 730) %>%
mutate(SEX = "M") %>%
rbind(who_bmi_for_age_girls %>%
filter(Day <= 729) %>%
filter(Day <= 730) %>%
mutate(SEX = "F")) %>%
rename(AGE = Day) %>%
rbind(cdc_bmiage %>%
Expand All @@ -54,10 +54,10 @@ data(who_lgth_ht_for_age_girls)
data(cdc_htage)

height_for_age <- who_lgth_ht_for_age_boys %>%
filter(Day <= 729) %>%
filter(Day <= 730) %>%
mutate(SEX = "M") %>%
rbind(who_lgth_ht_for_age_girls %>%
filter(Day <= 729) %>%
filter(Day <= 730) %>%
mutate(SEX = "F")) %>%
rename(AGE = Day) %>%
rbind(cdc_htage %>%
Expand All @@ -77,10 +77,10 @@ data(who_wt_for_age_girls)
data(cdc_wtage)

weight_for_age <- who_wt_for_age_boys %>%
filter(Day <= 729) %>%
filter(Day <= 730) %>%
mutate(SEX = "M") %>%
rbind(who_wt_for_age_girls %>%
filter(Day <= 729) %>%
filter(Day <= 730) %>%
mutate(SEX = "F")) %>%
rename(AGE = Day) %>%
rbind(cdc_wtage %>%
Expand All @@ -100,10 +100,10 @@ data(who_hc_for_age_boys)
data(who_hc_for_age_girls)

who_hc_for_age <- who_hc_for_age_boys %>%
filter(Day <= 729) %>%
filter(Day <= 730) %>%
mutate(SEX = "M") %>%
rbind(who_hc_for_age_girls %>%
filter(Day <= 729) %>%
filter(Day <= 730) %>%
mutate(SEX = "F")) %>%
rename(AGE = Day) %>%
arrange(AGE, SEX)
Expand Down

0 comments on commit e7721d9

Please sign in to comment.