NA_to_X: 'NA' to specified value

View source: R/misc.R

NA_to_XR Documentation

NA to specified value

Description

Replace NA values in a vector with a specified value.

Usage

NA_to_X(x, replacement)

Arguments

x

A vector

replacement

The value to replace NA with

Value

A vector of the same length as x

Examples

c(1, 2, 3, 4) %>% NA_to_X(3)

Deleetdk/kirkegaard documentation built on June 8, 2025, 4:09 a.m.