coalf: Factor-friendly Coalesce

View source: R/coalf.R

coalfR Documentation

Factor-friendly Coalesce

Description

Coalesce function that matches and updates factor levels appropriately. Checks each argument vector starting with the first until a non-NA value is found. Author: Bryce Chamberlain.

Usage

coalf(...)

Arguments

...

Source vectors.

Value

Vector of values.

Examples

x <- sample(c(1:5, NA, NA, NA))
coalf(x, 0L)

oliver-wyman-actuarial/easyr documentation built on Jan. 27, 2024, 4:37 a.m.