set_names

0th

Percentile

Set names of a vector.

This is a snake case wrapper for setNames, with tweaked defaults, and stricter argument checking.

Usage
set_names(x, nm = x)
Arguments
x
Vector to name.
nm
Vector of names, the same length as x.
Aliases
  • set_names
Examples
set_names(1:4, c("a", "b", "c", "d"))

# If the second argument is ommitted a vector is named with itself
set_names(letters[1:5])
Documentation reproduced from package rlang, version 0.0.0.9000, License: GPL-3

Community examples

Looks like there are no examples yet.