set_names {purrr} | R Documentation |
This is a snake case wrapper for setNames
, with
tweaked defaults, and stricter argument checking.
set_names(x, nm = x)
x |
Vector to name |
nm |
Vector of names, the same length as |
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])