diff --git a/R/infants_clean.R b/R/infants_clean.R index 7819594..fb79afd 100644 --- a/R/infants_clean.R +++ b/R/infants_clean.R @@ -1384,7 +1384,7 @@ cleanbatch_infants <- function(data.df, # merge with WHO # add the column name we want to grab df[, who_mindiff_ht := NA] - df[, who_mindiff_ht := NA] + df[, who_maxdiff_ht := NA] for (i in unique(df$whoinc.age.ht[!is.na(df$whoinc.age.ht)])){ cn <- paste0("whoinc.", i, ".ht") df[, who_mindiff_ht := @@ -1435,7 +1435,7 @@ cleanbatch_infants <- function(data.df, # merge with WHO # add the column name we want to grab df[, who_mindiff_hc := NA] - df[, who_mindiff_hc := NA] + df[, who_maxdiff_hc := NA] for (i in unique(df$whoinc.age.hc[!is.na(df$whoinc.age.hc)])){ cn <- paste0("whoinc.", i, ".ht") df[, who_mindiff_hc :=