Skip to content

Commit 3dbbd9b

Browse files
committed
Merge branch 'master' of github.com:tidyverse/tidyr
2 parents ddeb795 + 6b1afee commit 3dbbd9b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

R/replace_na.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#' library(dplyr)
1111
#' df <- tibble(x = c(1, 2, NA), y = c("a", NA, "b"), z = list(1:5, NULL, 10:20))
1212
#' df %>% replace_na(list(x = 0, y = "unknown"))
13+
#' df %>% mutate(x = replace_na(x, 0))
1314
#'
1415
#' # NULL are the list-col equivalent of NAs
1516
#' df %>% replace_na(list(z = list(5)))

0 commit comments

Comments
 (0)