Ensure that a vector has only a single value throughout.
single_value.RdMissing values are replaced with the single value, and if all values are
missing, the first value in missing is used throughout.
Examples
single_value(c(NA, 1))
#> [1] 1
single_value.RdMissing values are replaced with the single value, and if all values are
missing, the first value in missing is used throughout.
single_value(c(NA, 1))
#> [1] 1