Closed HughParsonage closed 3 years ago
If something is type integer
ensure this is preserved (i.e. not coerced to double). For example,
aus[is_vaccinated == TRUE,
days_since_first_dose := 1000] %>%
.[is_vaccinated == FALSE,
days_since_first_dose := 0]
# better
aus[is_vaccinated == TRUE,
days_since_first_dose := 1000L] %>%
.[is_vaccinated == FALSE,
days_since_first_dose := 0L]
# best
aus[, days_since_first_dose := fifelse(is_vaccinated, 1000L, 0L)]
``
Thanks Hugh. I'll play around and see if there are any significant improvements with options
or sum_and3s
.
I have changed to aus[, days_since_first_dose := fifelse(is_vaccinated, 1000L, 0L)]
(my standard practice!) in #23.
I'll just put down random thoughts.
Consider