names2: Replacement for names which always returns a vector.
Description
A simple wrapper for names.
Returns a vector even if no names attribute is set.
Values NA and "" are treated as missing and
replaced with the value provided in missing.val.
Usage
names2(x, missing.val = NA_character_)
Value
[character]: vector of the same length as x.
Arguments
x
[ANY]
Object, probably named.
missing.val
[ANY]
Value to set for missing names. Default is NA_character_.