coalesce: Coalesce two vector

View source: R/utils-conv.R

coalesceR Documentation

Coalesce two vector

Description

A simple wrapper around fcoalesce.

Usage

coalesce(new, old)

Arguments

new

the newer vector to be coalesced into. Will take priority if both columns have values at the same position.

old

the older vector to be coalesced.

Value

a vector of the type of new

Examples

x = c(11L, NA, 13L, NA, 15L, NA)
y = c(NA, 12L, 5L, NA, NA, NA)
nsqipr:::coalesce(x, y)


dylanrussellmd/nsqipr documentation built on Oct. 13, 2023, 11:01 a.m.