Fill in missing values in a vector by successively pulling from candidate vectors in order. As per the ANSI SQL function COALESCE,
BBmisc::coalesce which just returns the first non-NULL vector.
Written in C, and multithreaded for numeric and factor types.
A set of same-class vectors. These vectors can be supplied as separate arguments or as a single plain list, data.table or data.frame, see examples.
Factor type is supported only when the factor levels of each item are equal.
Atomic vector of the same type and length as the first vector, having
NA values replaced by corresponding non-
NA values from the other vectors.
If the first item is
NULL, the result is