names2

0th

Percentile

Get names of a vector

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 "".

Usage
names2(x)
Arguments
x

A vector.

Aliases
  • names2
Examples
# NOT RUN {
names2(letters)

# It also takes care of standardising missing names:
x <- set_names(1:3, c("a", NA, "b"))
names2(x)
# }
Documentation reproduced from package rlang, version 0.1.6, License: GPL-3

Community examples

Looks like there are no examples yet.