Add names to a vector, with default names.
add_names(x, names = NULL, prefix = "x")
A vector.
Vector of names to add. If NULL
, default names are added.
The prefix to add before default names. Useful only if
names
is set to NULL
.
A named vector
add_names(month.name)
#> x01 x02 x03 x04 x05 x06
#> "January" "February" "March" "April" "May" "June"
#> x07 x08 x09 x10 x11 x12
#> "July" "August" "September" "October" "November" "December"