powered by
Sets or removes names
set_names(x, nm = x)remove_names(x)x %names% nmis_named(x, zero_ok = TRUE)
remove_names(x)
x %names% nm
is_named(x, zero_ok = TRUE)
x with nm values assigned to names (if x is NULL, NULL is returned)
x
nm
NULL
A vector of values
A vector of names
If TRUE allows use of "" as a special name
TRUE
""
set_names(1:5) set_names(1:5, c("a", "b", "c", "d", "e")) x <- c(a = 1, b = 2) remove_names(x) x %names% c("c", "d") is_named(x)
Run the code above in your browser using DataLab