# NOT RUN {
test_df <- data.table(
a = c(1, NA, 3, 4, 5),
b = c(NA, 2, NA, NA, 5),
groups = c("a", "a", "a", "b", "b")
)
test_df %>%
fill.(a, b)
test_df %>%
fill.(a, b, .direction = "downup")
test_df %>%
fill.(a, b, .direction = "downup", .by = groups)
# }
Run the code above in your browser using DataLab