source("../R/utils.R") source("../R/fill_na.R")
The fill_na
function is used to fill in, or replace, NAs with values. fill_na
works on the most common data structures in R: data.frames, matricies, lists, vectors, and data.tables. Let's start by going over how fill_na
works on data.frames, the most common use case.
fill_na
is designed to work with the magrittr pipe %>%
, so the first argument, .data
, is always the object that you want to fill in NAs for. The second argument, .fill
, may be one of three things:
identify_type
function) Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.