names
. Returns a
vector even if no names attribute is set (and not
NULL
). Missing names are returned as NA
,
not ""
.names2(x)
character
]: vector of the same length as
x
.x <- 1:3
names(x)
names2(x)
names(x[1:2]) = letters[1:2]
names(x)
names2(x)
Run the code above in your browser using DataLab