This is a method for the tidyr::replace_na()
generic.
Usage
# S3 method for class 'tbl_lazy'
replace_na(data, replace = list(), ...)
Value
Another tbl_lazy
. Use show_query()
to see the generated
query, and use collect()
to execute the query
and return data to R.
Examples
df <- memdb_frame(x = c(1, 2, NA), y = c("a", NA, "b"))
df %>% tidyr::replace_na(list(x = 0, y = "unknown"))
#> # Source: SQL [3 x 2]
#> # Database: sqlite 3.47.1 [:memory:]
#> x y
#> <dbl> <chr>
#> 1 1 a
#> 2 2 unknown
#> 3 0 b