replace_na: Replace NA Values

Description Usage Arguments Details Examples

Description

Convenience method for returning a copy of a vector such that NA values are substituted with a replacement value

Usage

1
replace_na(x, repl = "auto")

Arguments

x

vector of values

repl

what to substitute in place of NAs

Details

Returns a copy of x such that NAs get replaced with a replacement value. Default replacement value is 0.

Examples

1
replace_na(c(1, NA, 1, 0))

mltools documentation built on May 2, 2019, 5:22 a.m.