has_names {msgr} | R Documentation |
Checks whether the variable has names
Description
Checks whether the variable has names
Usage
has_names(x, nm)
Arguments
x |
(any) The object to test |
nm |
(character, optional) The names to check for. If not specified then the function checks for any names. |
Value
TRUE if x has any names, FALSE otherwise
Examples
x <- list(a = 1, b = 2)
has_names(x, "a")
has_names(x, c("a", "b"))
has_names(x, "c")
[Package msgr version 1.1.2 Index]