This names getter always returns a character vector, even when an
object does not have a names attribute. In this case, it returns
a vector of empty names "". It also standardises missing names to
"".
names2(x)
| x | A vector. |
|---|
names2() is stable.
names2(letters)#> [1] "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" #> [26] ""#> [1] "a" "" "b"