na_replace: Replace missing values

na_replaceR Documentation

Replace missing values

Description

Replaces NA values found in a vector with a specified scalar value

⁠NOTE:⁠ The dplyr::coalesce() function now provides this functionality in a more general way, so this function may merit deprecation.

Usage

na_replace(x, replace)

Arguments

x

Vector possibly containing missing (NA) values.

replace

Scalar replacement value.

Value

Copy of x with any missing values replaced with replace.

See Also

Other functions for NA handling: na_if_in()


torfason/zulutils documentation built on Aug. 21, 2023, 5:46 p.m.