Description Usage Arguments Examples
An alternative to na_to_zero_df(). Use purrr::map() instead.
1 | na_to_zero(val)
|
val |
A value. |
1 2 3 4 5 6 7 8 | sample_df <- list(a = c(1:2, NA),
b = letters[1:3],
c = c(NA, "foo", "bar")) %>%
tibble::as_tibble()
sample_df %>% purrr::map_df(na_to_zero)
cols_to_zero <- c("a", "b")
sample_df %>% purrr::map_at(na_to_zero, .at = cols_to_zero) %>% tibble::as_tibble()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.