powered by
This is a method for the tidyr::replace_na() generic.
tidyr::replace_na()
# S3 method for tbl_lazy replace_na(data, replace = list(), ...)
Another tbl_lazy. Use show_query() to see the generated query, and use collect() to execute the query and return data to R.
tbl_lazy
show_query()
collect()
A pair of lazy data frame backed by database queries.
A named list of values, with one value for each column that has NA values to be replaced.
Unused; included for compatibility with generic.
df <- memdb_frame(x = c(1, 2, NA), y = c("a", NA, "b")) df %>% tidyr::replace_na(list(x = 0, y = "unknown"))
Run the code above in your browser using DataLab