Skip to content

Commit

Permalink
Fix maxdiff preallocation
Browse files Browse the repository at this point in the history
  • Loading branch information
delosh653 committed Aug 10, 2023
1 parent 623df09 commit 8dbde80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/infants_clean.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 :=
Expand Down Expand Up @@ -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 :=
Expand Down

0 comments on commit 8dbde80

Please sign in to comment.