powered by
Convience method for returning a copy of a vector such that NA values are substituted with a replacement value
replace_na(x, repl = "auto")
vector of values
what to substitute in place of NAs
Returns a copy of x such that NAs get replaced with a replacement value. Default replacement value is 0.
x
replace_na(c(1, NA, 1, 0))
Run the code above in your browser using DataLab