powered by
A shortcut to replace NAs inside of a mutate.() call.
mutate.()
Note: This function does not work outside of mutate.() like tidyr::replace_na() does.
tidyr::replace_na()
replace_na.(.col, replace)dt_replace_na(.col, replace)
dt_replace_na(.col, replace)
A vector
A single value used for replacement
# NOT RUN { test_df <- data.table( x = c(1, 2, NA), y = c(NA, 1, 2)) test_df %>% mutate.(x = replace_na.(x, 5)) # }
Run the code above in your browser using DataLab